|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
abstraction of a Thread Pool
Field Summary | |
static String |
THREADPOOL_BLOCKED_ACTION_HANDLER
key to specifiy pool behavior apon blocked action 0 - run when block 1 - wait when block 2 - abort when block 3 - discard when block 4- discard oldest when block |
static String |
THREADPOOL_BUFFERSIZE
key to access the config.xml for the size of thread request to buffer when the pool is busy |
static String |
THREADPOOL_ENABLEATSTARTUP
key to access the config.xml for |
static String |
THREADPOOL_EXECUTOR_CLASS
key to specifiy pool executor class to be used if specified, discards the THREADPOOL_BLOCKED_ACTION_HANDLER settings |
static String |
THREADPOOL_INITIALTHREADS
key to access the config.xml for the number of threads to initiate on pool start up |
static String |
THREADPOOL_KEEPALIVETIME
key to access the config.xml for the time (in milli seconds) that idle threads should be kept alife |
static String |
THREADPOOL_MAXTHREADS
key to access the config.xml for the max number of threads the pool should provide |
static String |
THREADPOOL_MGR
key to access the services.xml for the implementing class |
static String |
THREADPOOL_MINTHREADS
key to access the config.xml for the min number of threads the pool should provide |
Method Summary | |
void |
dumpStatistics()
dump the current pool state to a default output stream (i.e. |
void |
dumpStatistics(Writer out)
dump current pool state to the provided writer |
void |
execute(Runnable task)
run a task using the thread pool (the task has to implement Runnable) |
void |
init(Map params)
initialize your ThreadPool (if you need to) |
void |
interruptAll()
interrupt all running threads |
boolean |
isAvailable()
is the pool available / active ? |
boolean |
isTerminatedAfterShutdown()
check if the pool has terminated (after the shutdown was called) |
List |
shutdown()
shutdown the thread pool to free resources |
Field Detail |
public static final String THREADPOOL_MGR
public static final String THREADPOOL_BUFFERSIZE
public static final String THREADPOOL_MAXTHREADS
public static final String THREADPOOL_MINTHREADS
public static final String THREADPOOL_INITIALTHREADS
public static final String THREADPOOL_KEEPALIVETIME
public static final String THREADPOOL_ENABLEATSTARTUP
public static final String THREADPOOL_BLOCKED_ACTION_HANDLER
public static final String THREADPOOL_EXECUTOR_CLASS
Method Detail |
public void init(Map params)
params
- a map of params to initialize the thread poolpublic void execute(Runnable task) throws InterruptedException
task
- the Runnable taskpublic void interruptAll()
public List shutdown()
java.util.List
of tasks (Runnable) that have not yet been processed (from the buffer), or nullpublic boolean isTerminatedAfterShutdown()
public void dumpStatistics(Writer out)
out
- a Writer to write topublic void dumpStatistics()
public boolean isAvailable()
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |