public final class AsyncTaskManager extends Object implements AsyncTaskProcessorThreadListener, AsyncTaskManagerMBean
| Constructor and Description |
|---|
AsyncTaskManager(String name,
int threadPoolMinSize,
int threadPoolMaxIdle,
int threadPoolMaxSize)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelTask(AsyncTask task)
Cancel a task for the manager queue
|
void |
close()
Close manager resources
|
void |
execute(AsyncTask task)
Asynchronously execute the given task
|
void |
executionComplete(AsyncTaskProcessorThread thread)
Called on task execution completion by a thread
|
String |
getName()
Get the manager name
|
int |
getTaskQueueSize()
Get the manager internal queue size
|
int |
getThreadPoolAvailableCount() |
int |
getThreadPoolExhaustionPolicy() |
int |
getThreadPoolMaxIdle() |
int |
getThreadPoolMaxSize() |
int |
getThreadPoolMinSize() |
int |
getThreadPoolPendingWaits() |
int |
getThreadPoolSize() |
long |
getThreadPoolWaitTimeout() |
public AsyncTaskManager(String name, int threadPoolMinSize, int threadPoolMaxIdle, int threadPoolMaxSize) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void cancelTask(AsyncTask task)
task - public void execute(AsyncTask task) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void executionComplete(AsyncTaskProcessorThread thread)
AsyncTaskProcessorThreadListenerexecutionComplete in interface AsyncTaskProcessorThreadListenerpublic void close()
public String getName()
AsyncTaskManagerMBeangetName in interface AsyncTaskManagerMBeanpublic int getTaskQueueSize()
AsyncTaskManagerMBeangetTaskQueueSize in interface AsyncTaskManagerMBeanpublic int getThreadPoolMaxIdle()
getThreadPoolMaxIdle in interface ObjectPoolMBeanpublic int getThreadPoolMinSize()
getThreadPoolMinSize in interface ObjectPoolMBeanpublic int getThreadPoolMaxSize()
getThreadPoolMaxSize in interface ObjectPoolMBeanpublic int getThreadPoolExhaustionPolicy()
getThreadPoolExhaustionPolicy in interface ObjectPoolMBeanpublic long getThreadPoolWaitTimeout()
getThreadPoolWaitTimeout in interface ObjectPoolMBeanpublic int getThreadPoolAvailableCount()
getThreadPoolAvailableCount in interface ObjectPoolMBeanpublic int getThreadPoolPendingWaits()
getThreadPoolPendingWaits in interface ObjectPoolMBeanpublic int getThreadPoolSize()
getThreadPoolSize in interface ObjectPoolMBeanCopyright © 2021. All rights reserved.