|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ThreadPool interface gives access to methods needed to inspect and use of a pool of threads
Field Summary | |
static String |
POLICY_ABORT
ThreadPool block policy ABORT |
static String |
POLICY_DISCARD
ThreadPool block policy DISCARD |
static String |
POLICY_DISCARD_OLDEST
ThreadPool block policy DISCARD-OLDEST |
static String |
POLICY_RUN
ThreadPool block policy RUN |
static String |
POLICY_WAIT
ThreadPool block policy WAIT |
static String |
ROLE
The Role name |
Method Summary | |
void |
execute(Runnable command)
Execute a command using this pool |
String |
getBlockPolicy()
The blocking policy used |
long |
getKeepAliveTime()
How long will a thread in this pool be idle before it is allowed to be garbage collected |
int |
getMaximumPoolSize()
How many threads are in this pool at maximum |
int |
getMaximumQueueSize()
Maximum size of the queue |
int |
getMinimumPoolSize()
How many threads are in this pool at minimum |
String |
getName()
The Name of this thread pool |
int |
getPoolSize()
How many threads are currently in this pool |
int |
getPriority()
Get the thread priority used by this pool |
int |
getQueueSize()
Current size of the queue. |
boolean |
isQueued()
Whether this ThreadPool has a queue |
boolean |
isTerminatedAfterShutdown()
Returns true if a shutDown method has succeeded in terminating all threads |
void |
shutdown()
Terminates all threads possibly awaiting processing all elements currently in queue. |
Field Detail |
public static final String POLICY_ABORT
public static final String POLICY_DISCARD
public static final String POLICY_DISCARD_OLDEST
public static final String POLICY_RUN
public static final String POLICY_WAIT
public static final String ROLE
Method Detail |
public String getBlockPolicy()
public long getKeepAliveTime()
public int getMaximumPoolSize()
public int getMaximumQueueSize()
public int getMinimumPoolSize()
public String getName()
public int getPoolSize()
public int getPriority()
public int getQueueSize()
public boolean isQueued()
public boolean isTerminatedAfterShutdown()
public void execute(Runnable command) throws InterruptedException
command
- a Runnable
to execute
InterruptedException
- In case of interruptionpublic void shutdown()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |