Class QueueConsumingThreadPool<T>
- java.lang.Object
-
- lumis.portal.monitor.impl.process.QueueConsumingThreadPool<T>
-
- Type Parameters:
T
- the queue items identifier type.
public class QueueConsumingThreadPool<T> extends java.lang.Object
Queue consuming thread pool.- Since:
- 17.0.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description QueueConsumingThreadPool(QueueConsumingThreadPoolOptions<T> options)
Creates a newQueueConsumingThreadPool
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IQueueConsumingThreadPoolStatistics
getStatistics()
Returns the thread pool statistics.void
shutdown()
Shuts down the thread pool.void
submit(java.lang.Runnable command)
Submits a task to the thread pool.void
submit(java.lang.Runnable command, T id)
Submits a task to the thread pool.void
update(QueueConsumingThreadPoolOptions<T> options)
Updates the options.
-
-
-
Constructor Detail
-
QueueConsumingThreadPool
public QueueConsumingThreadPool(QueueConsumingThreadPoolOptions<T> options)
Creates a newQueueConsumingThreadPool
instance.- Parameters:
options
- the options.- Since:
- 17.0.0
-
-
Method Detail
-
update
public void update(QueueConsumingThreadPoolOptions<T> options)
Updates the options.- Parameters:
options
- the options.- Since:
- 17.0.0
-
shutdown
public void shutdown()
Shuts down the thread pool.- Since:
- 17.0.0
-
submit
public void submit(java.lang.Runnable command)
Submits a task to the thread pool.- Parameters:
command
- the task.- Since:
- 17.0.0
-
submit
public void submit(java.lang.Runnable command, T id)
Submits a task to the thread pool. Ignores if a given task with the same identifier has already been submitted.- Parameters:
command
- the task.id
- the identifier of the task.- Since:
- 17.0.0
-
getStatistics
public IQueueConsumingThreadPoolStatistics getStatistics()
Returns the thread pool statistics.- Returns:
- the thread pool statistics.
- Since:
- 17.0.0
-
-