T
- the type of both the input and output portspublic class Distributor<T> extends AbstractConsumerStage<T>
getNewOutputPort()
.+----------------------------+ | | | +---+ | +------------> | | | | +---+ | | | +---+ | | | +-------+--- . . . . +---+ | | | | | | +---+ | +------------> | | | +---+ | | +----------------------------+
Modifier and Type | Field and Description |
---|---|
protected IDistributorStrategy |
strategy |
inputPort
logger
Constructor and Description |
---|
Distributor() |
Distributor(IDistributorStrategy strategy) |
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.
|
OutputPort<T> |
getNewOutputPort() |
List<OutputPort<?>> |
getOutputPorts() |
IDistributorStrategy |
getStrategy() |
void |
setStrategy(IDistributorStrategy strategy) |
createInputPort, execute, getInputPort
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOwningThread, getTerminationStrategy, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
protected IDistributorStrategy strategy
public Distributor()
public Distributor(IDistributorStrategy strategy)
protected void execute(T element)
AbstractConsumerStage
execute
in class AbstractConsumerStage<T>
element
- the next non-null element from the (only) input port of this stagepublic OutputPort<T> getNewOutputPort()
public IDistributorStrategy getStrategy()
public void setStrategy(IDistributorStrategy strategy)
public List<OutputPort<?>> getOutputPorts()
getOutputPorts
in class AbstractStage
Copyright © 2015–2020. All rights reserved.