DATATYPE - The type of the objects in the queue.public class ConcurrentCollectorSingle<DATATYPE> extends AbstractConcurrentCollector<DATATYPE>
DEFAULT_MAX_QUEUE_SIZE, m_aQueue, STOP_QUEUE_OBJECT| Constructor and Description |
|---|
ConcurrentCollectorSingle()
Constructor that uses
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length. |
ConcurrentCollectorSingle(int nMaxQueueSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected IThrowingRunnableWithParameter<DATATYPE> |
getPerformer() |
void |
run()
Run it.
|
protected void |
setPerformer(IThrowingRunnableWithParameter<DATATYPE> aPerformer)
Set the performer to be used.
|
getQueueLength, isQueueEmpty, isStopped, queueObject, stopQueuingNewObjectspublic ConcurrentCollectorSingle()
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length.public ConcurrentCollectorSingle(@Nonnegative int nMaxQueueSize)
nMaxQueueSize - The maximum number of items that can be in the queue. Must be >
0.@Nullable protected final IThrowingRunnableWithParameter<DATATYPE> getPerformer()
null if none was explicitly
set.protected final void setPerformer(@Nonnull IThrowingRunnableWithParameter<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.