| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ThreadPool
The ThreadPool interface gives access to methods needed to inspect and use of a pool of threads
| Field Summary | |
|---|---|
| static String | POLICY_ABORTThreadPool block policy ABORT | 
| static String | POLICY_DISCARDThreadPool block policy DISCARD | 
| static String | POLICY_DISCARD_OLDESTThreadPool block policy DISCARD-OLDEST | 
| static String | POLICY_RUNThreadPool block policy RUN | 
| static String | POLICY_WAITThreadPool block policy WAIT | 
| static String | ROLEThe 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 | 
|---|
static final String POLICY_ABORT
static final String POLICY_DISCARD
static final String POLICY_DISCARD_OLDEST
static final String POLICY_RUN
static final String POLICY_WAIT
static final String ROLE
| Method Detail | 
|---|
String getBlockPolicy()
long getKeepAliveTime()
int getMaximumPoolSize()
int getMaximumQueueSize()
int getMinimumPoolSize()
String getName()
int getPoolSize()
int getPriority()
int getQueueSize()
boolean isQueued()
boolean isTerminatedAfterShutdown()
void execute(Runnable command)
             throws InterruptedException
command - a Runnable to execute
InterruptedException - In case of interruptionvoid shutdown()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||