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 and DEFAULT_MAX_PERFORM_COUNT as the max
perform count. |
ConcurrentCollectorMultiple(int nMaxQueueSize,
int nMaxPerformCount)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected IThrowingRunnableWithParameter<List<DATATYPE>> |
getPerformer() |
void |
run()
Run it.
|
protected void |
setPerformer(IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer)
Set the performer to be used.
|
getQueueLength, isQueueEmpty, isStopped, queueObject, stopQueuingNewObjectspublic static final int DEFAULT_MAX_PERFORM_COUNT
public ConcurrentCollectorMultiple()
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length and DEFAULT_MAX_PERFORM_COUNT as the max
perform count.public ConcurrentCollectorMultiple(@Nonnegative int nMaxQueueSize, @Nonnegative int nMaxPerformCount)
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.@Nullable protected final IThrowingRunnableWithParameter<List<DATATYPE>> getPerformer()
null if none was explicitly
set.protected final void setPerformer(@Nonnull IThrowingRunnableWithParameter<List<DATATYPE>> aPerformer)
aPerformer - The performer to be used. May not be null.IllegalStateException - If another performer is already present!public final void run()
INonThrowingRunnableCopyright © 2014–2015 Philip Helger. All rights reserved.