|
||||||||||
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 |
DEFAULT_BLOCK_POLICY
The default shutdown waittime time |
static boolean |
DEFAULT_DAEMON_MODE
The default daemon mode |
static long |
DEFAULT_KEEP_ALIVE_TIME
The default keep alive time |
static int |
DEFAULT_MAX_POOL_SIZE
The default maximum pool size |
static int |
DEFAULT_MIN_POOL_SIZE
The default minimum pool size |
static int |
DEFAULT_QUEUE_SIZE
The default queue size |
static boolean |
DEFAULT_SHUTDOWN_GRACEFUL
The default way to shutdown gracefully |
static int |
DEFAULT_SHUTDOWN_WAIT_TIME
The default shutdown waittime time |
static String |
DEFAULT_THREAD_PRIORITY
The default thread priority |
static String |
DEFAULT_THREADPOOL_NAME
The default shutdown waittime time |
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 |
String |
getBlockPolicy()
Gets the block policy |
long |
getKeepAliveTime()
Gets the keepAliveTime in milliseconds |
int |
getMaxPoolSize()
Gets the maximum pool size |
int |
getMaxQueueSize()
Gets the maximum queue size |
int |
getMinPoolSize()
Gets the minimum pool size |
String |
getName()
Gets the name of the thread pool |
int |
getPriority()
Gets the priority used to create Threads |
int |
getQueueSize()
Gets the queue size of the thread pool |
int |
getShutdownWaitTimeMs()
Gets the shutdownWaitTime in milliseconds |
boolean |
isDaemon()
Returns true if thread runs as daemon |
boolean |
isQueued()
Whether this DefaultThreadPool has a queue |
boolean |
isShutdownGraceful()
Returns true if shutdown is graceful |
boolean |
isTerminatedAfterShutdown()
Returns true if a shutDown method has succeeded in terminating all threads |
Field Detail |
public static final int DEFAULT_QUEUE_SIZE
public static final int DEFAULT_MAX_POOL_SIZE
public static final int DEFAULT_MIN_POOL_SIZE
public static final String DEFAULT_THREAD_PRIORITY
public static final boolean DEFAULT_DAEMON_MODE
public static final long DEFAULT_KEEP_ALIVE_TIME
public static final boolean DEFAULT_SHUTDOWN_GRACEFUL
public static final int DEFAULT_SHUTDOWN_WAIT_TIME
public static final String DEFAULT_THREADPOOL_NAME
public static final String DEFAULT_BLOCK_POLICY
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 int getMaxQueueSize()
public String getName()
public int getPriority()
Thread.MIN_PRIORITY
, Thread.NORM_PRIORITY
,
or Thread.MAX_PRIORITY
public int getQueueSize()
public boolean isQueued()
public void execute(Runnable command) throws InterruptedException
command
- The Runnable
to execute
InterruptedException
- In case of interruptionpublic boolean isShutdownGraceful()
public int getShutdownWaitTimeMs()
public long getKeepAliveTime()
public int getMaxPoolSize()
public int getMinPoolSize()
public boolean isDaemon()
public boolean isTerminatedAfterShutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |