public interface WorkerPool
Modifier and Type | Method and Description |
---|---|
void |
execute(Runnable task)
Asynchronously execute the given task using one of the threads of the worker pool.
|
int |
getActiveCount() |
int |
getQueueSize() |
void |
shutdown(int timeout)
Destroy the worker pool.
|
void execute(Runnable task)
Runnable.run()
should not
throw an exception. Any uncaught exceptions should be logged by the worker pool
implementation.task
- the task to executeint getActiveCount()
int getQueueSize()
void shutdown(int timeout) throws InterruptedException
timeout
- the timeout value in millisecondsInterruptedException
- if the current thread was
interrupted while waiting for pending tasks to
finish executionCopyright © 2004–2019 The Apache Software Foundation. All rights reserved.