DATATYPE - The type of objects to be queuedpublic interface IMutableConcurrentCollector<DATATYPE> extends IConcurrentCollector<DATATYPE>
queueObject(Object) method).| Modifier and Type | Method and Description |
|---|---|
void |
collect()
This method starts the collector by taking objects from the internal queue.
|
ESuccess |
queueObject(DATATYPE aObject)
Submit an object to the queue.
|
ESuccess |
stopQueuingNewObjects()
Stop taking new objects in the collector.
|
getQueueLength, isQueueEmpty, isStopped@Nonnull ESuccess queueObject(@Nonnull DATATYPE aObject)
aObject - The object to submit. May not be null.ESuccessIllegalStateException - If the queue is already stopped@Nonnull ESuccess stopQueuingNewObjects()
ESuccessvoid collect()
stopQueuingNewObjects() is new called and the
queue is empty.Copyright © 2014–2017 Philip Helger. All rights reserved.