| java.lang.Object examples.util.concurrent.AsynchronousManager
AsynchronousManager | public class AsynchronousManager (Code) | | Manages the thread pool for all the asynchronous invocations.
author: Jonas BonŽr |
Method Summary | |
protected void | createBoundedThreadPool(int threadPoolMaxSize, int threadPoolMinSize, int threadPoolInitSize, int keepAliveTime, boolean waitWhenBlocked) Creates a bounded thread pool. | protected void | createDynamicThreadPool(int threadPoolMinSize, int threadPoolInitSize, int keepAliveTime) Creates a dynamic thread pool. | public void | execute(Runnable task) Executes a task in a thread from the thread pool. | public static AsynchronousManager | getInstance() Returns the one A only AsynchronousManager instance. | public synchronized void | initialize(Definition definition) Initializes the thread pool. | protected boolean | notInitialized() Checks if the service has been initialized. | public void | stop() Closes down the thread pool. |
m_initialized | protected boolean m_initialized(Code) | | |
m_threadPool | protected PooledExecutor m_threadPool(Code) | | |
AsynchronousManager | protected AsynchronousManager()(Code) | | Private constructor.
|
createBoundedThreadPool | protected void createBoundedThreadPool(int threadPoolMaxSize, int threadPoolMinSize, int threadPoolInitSize, int keepAliveTime, boolean waitWhenBlocked)(Code) | | Creates a bounded thread pool.
Parameters: threadPoolMaxSize - Parameters: threadPoolMinSize - Parameters: threadPoolInitSize - Parameters: keepAliveTime - Parameters: waitWhenBlocked - |
createDynamicThreadPool | protected void createDynamicThreadPool(int threadPoolMinSize, int threadPoolInitSize, int keepAliveTime)(Code) | | Creates a dynamic thread pool.
Parameters: threadPoolMinSize - Parameters: threadPoolInitSize - Parameters: keepAliveTime - |
execute | public void execute(Runnable task)(Code) | | Executes a task in a thread from the thread pool.
Parameters: task - the task to execute (Runnable) |
getInstance | public static AsynchronousManager getInstance()(Code) | | Returns the one A only AsynchronousManager instance.
the asynchronous manager |
initialize | public synchronized void initialize(Definition definition)(Code) | | Initializes the thread pool.
Parameters: def - the definition |
notInitialized | protected boolean notInitialized()(Code) | | Checks if the service has been initialized.
boolean |
stop | public void stop()(Code) | | Closes down the thread pool.
|
|
|