T
- the type of the elements to be collectedpublic final class CollectorSink<T> extends AbstractConsumerStage<T>
inputPort
logger
Constructor and Description |
---|
CollectorSink()
Creates a new
CollectorSink with an empty ArrayList . |
CollectorSink(List<T> list) |
Modifier and Type | Method and Description |
---|---|
protected void |
execute(T element)
Contains the logic of this stage and is invoked (possibly multiple times) by the framework.
|
List<T> |
getElements() |
createInputPort, execute, getInputPort
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, getTerminationStrategy, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
public CollectorSink()
CollectorSink
with an empty ArrayList
.protected void execute(T element)
AbstractConsumerStage
execute
in class AbstractConsumerStage<T>
element
- the next non-null element from the (only) input port of this stageCopyright © 2015–2020. All rights reserved.