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,
IThrowingRunnableWithParameter<DATATYPE> aPerformer)
Constructor.
|
ConcurrentCollectorSingle(IThrowingRunnableWithParameter<DATATYPE> aPerformer)
Constructor that uses
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length. |
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Run it.
|
protected void |
setPerformer(IThrowingRunnableWithParameter<DATATYPE> aPerformer) |
getQueueLength, isStopped, queueObject, stopQueuingNewObjectspublic ConcurrentCollectorSingle()
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length.public ConcurrentCollectorSingle(@Nullable IThrowingRunnableWithParameter<DATATYPE> aPerformer)
AbstractConcurrentCollector.DEFAULT_MAX_QUEUE_SIZE elements as the
maximum queue length.aPerformer - The callback to be invoked everytime objects are collected. May be
null but in that case
setPerformer(IThrowingRunnableWithParameter) must be
invoked!public ConcurrentCollectorSingle(@Nonnegative int nMaxQueueSize, @Nullable IThrowingRunnableWithParameter<DATATYPE> aPerformer)
nMaxQueueSize - The maximum number of items that can be in the queue. Must be >
0.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<DATATYPE> aPerformer)
public final void run()
INonThrowingRunnableCopyright © 2006–2015 phloc systems. All rights reserved.