|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThreadService
A ThreadService is a wrapper around an implementation of a ThreadPool. It's just a unique, abstract interface for controlling all kinds of possible ThreadPools, which can be used by EJOE.
Method Summary | |
---|---|
int |
getActiveWorkerCount()
Returns the amount of worker threads which are active. |
int |
getCurrentPoolsize()
Returns the amount of workers which are really usable in the underlying ThreadPool. |
int |
getExpectedPoolsize()
Returns the amount of workers the ThreadService expects to to have in the underlying ThreadPool according to the currently active pool size. |
void |
invokeLater(java.lang.Runnable task)
Queues a new task for asynchronous execution in the underlying ThreadPool |
void |
resize(int poolSize)
Resizes the amount of worker threads in the ThreadService to the given size. |
void |
stop()
Shutdown the underlying ThreadPool |
Method Detail |
---|
void invokeLater(java.lang.Runnable task)
task
- a task to execute within one of the available worker threadsvoid stop()
int getActiveWorkerCount()
int getCurrentPoolsize()
getExpectedPoolsize()
caused by crashed (or due to too less memory unstarted) worker threads.
int getExpectedPoolsize()
void resize(int poolSize)
poolSize
- the new amount of worker threads in the ThreadService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |