DATATYPE - The type of the objects in the queue.public class ConcurrentCollectorMultiple<DATATYPE> extends AbstractConcurrentCollector<DATATYPE>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_PERFORM_COUNT
The default number of objects to be put in the queue for execution.
|
DEFAULT_MAX_QUEUE_SIZE, m_aQueue, STOP_QUEUE_OBJECT| Constructor and Description |
|---|
ConcurrentCollectorMultiple()
Constructor that uses
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length. |
ConcurrentCollectorMultiple(int nMaxQueueSize,
int nMaxPerformCount,
IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer)
Constructor.
|
ConcurrentCollectorMultiple(IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer)
Constructor that uses
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length and DEFAULT_MAX_PERFORM_COUNT as the max
perform count. |
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Run it.
|
protected void |
setPerformer(IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer) |
getQueueLength, isStopped, queueObject, stopQueuingNewObjectspublic static final int DEFAULT_MAX_PERFORM_COUNT
public ConcurrentCollectorMultiple()
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length.public ConcurrentCollectorMultiple(@Nullable IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer)
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length and DEFAULT_MAX_PERFORM_COUNT as the max
perform count.aPerformer - The callback to be invoked everytime objects are collected. May be
null but in that case
setPerformer(IThrowingRunnableWithParameter) must be
invoked!public ConcurrentCollectorMultiple(@Nonnegative int nMaxQueueSize, @Nonnegative int nMaxPerformCount, @Nullable IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer)
nMaxQueueSize - The maximum number of items that can be in the queue. Must be >
0.nMaxPerformCount - The maximum number of objects to be put in the queue for execution.aPerformer - The callback to be invoked everytime objects are collected. May be
null but in that case
setPerformer(IThrowingRunnableWithParameter) must be
invoked!protected final void setPerformer(@Nonnull IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer)
public final void run()
INonThrowingRunnableCopyright © 2006–2014 phloc systems. All rights reserved.