|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThreadPool
Method Summary | ||
---|---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
|
|
java.util.concurrent.Executor |
cached()
Returns a cached executor that will always allocate threads. |
|
void |
execute(java.lang.Runnable command)
|
|
int |
getActiveCount()
Returns the approximate number of threads that are actively executing tasks. |
|
int |
getMaxThreads()
The maximum number of threads in the thread pool. |
|
int |
getMinThreads()
The minimum number of threads in the thread pool. |
|
int |
getPoolSize()
Returns the current number of threads in the pool. |
|
int |
getSchedulerActiveCount()
The approximate number of threads that are actively executing scheduled tasks. |
|
int |
getSchedulerPoolSize()
The size of the scheduler thread pool. |
|
int |
getSchedulerThreads()
The size of scheduler threads. |
|
ThreadPoolInfo |
info()
|
|
boolean |
isStarted()
Returns true if the thread pool has started. |
|
|
schedule(java.util.concurrent.Callable<V> callable,
long delay,
java.util.concurrent.TimeUnit unit)
|
|
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
|
|
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable command,
TimeValue delay)
|
|
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
|
|
java.util.concurrent.ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
|
|
java.util.concurrent.ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable command,
TimeValue interval)
|
|
void |
shutdown()
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. |
|
void |
shutdownNow()
|
|
ThreadPoolStats |
stats()
|
Method Detail |
---|
ThreadPoolInfo info()
ThreadPoolStats stats()
int getMinThreads()
int getMaxThreads()
int getSchedulerThreads()
int getPoolSize()
int getActiveCount()
int getSchedulerPoolSize()
int getSchedulerActiveCount()
boolean isStarted()
java.util.concurrent.Executor cached()
void shutdownNow()
void shutdown()
boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedException
void execute(java.lang.Runnable command)
execute
in interface java.util.concurrent.Executor
java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
<V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command, TimeValue delay)
java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, TimeValue interval)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |