public class CountingThreadFactory extends Object implements ThreadFactory
ThreadFactory that maintains a count of how many threads this factory has created| Constructor and Description |
|---|
CountingThreadFactory(ThreadFactory actualFactory)
Constructor accepting the actual thread factory that will create the threads
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfThreads()
Returns the number of threads this factory has created and currently alive
|
Thread |
newThread(Runnable r) |
public CountingThreadFactory(ThreadFactory actualFactory)
actualFactory - the actual factorypublic Thread newThread(Runnable r)
newThread in interface ThreadFactorypublic int getNumberOfThreads()
Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.