- java.lang.Object
-
- com.pervasive.datarush.ports.LogicalPort
-
- com.pervasive.datarush.ports.model.AbstractModelPort<Void>
-
- com.pervasive.datarush.ports.model.DoneSignalPort
-
public final class DoneSignalPort extends AbstractModelPort<Void>
Used to coordinate processing between operators that have a processing dependency but no explicit data dependency. An example would be one operator that writes data to a temporary file and another operator that reads from that file. Note that this is a rarely-used feature.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.pervasive.datarush.ports.LogicalPort
LogicalPort.Direction
-
-
Field Summary
Fields Modifier and Type Field Description static AbstractModelPortFactory<Void,DoneSignalPort>FACTORYThe factory for DoneSignalPorts
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LogicalPortFactory<? extends AbstractModelPort<?>>getFactory()Returns the factory that knows how to create ports of this typeAbstractModelPortMetadatagetMetadata(Void model)Returns the metadata associate with the model.Class<? extends PortMetadata>getMetadataType()Returns the class of metadata that this port usesstatic DoneSignalPortgetOutput(LogicalOperator op)Returns the done signal port from the given operator if it defines one, throwing an exception if none foundvoidsignalDone(ExecutionContext ctx)Signals downstream operators that we are donevoidwaitDone(ExecutionContext ctx)Waits until upstream operator has sent the done signal-
Methods inherited from class com.pervasive.datarush.ports.model.AbstractModelPort
getModel, getModelClass, getStorageHandler, setMergeHandler, setModel
-
Methods inherited from class com.pervasive.datarush.ports.LogicalPort
getDirection, getName, getOwner, isOptional, toString
-
-
-
-
Field Detail
-
FACTORY
public static final AbstractModelPortFactory<Void,DoneSignalPort> FACTORY
The factory for DoneSignalPorts
-
-
Method Detail
-
getMetadata
public AbstractModelPortMetadata getMetadata(Void model)
Description copied from class:AbstractModelPortReturns the metadata associate with the model. (Given a model, we should always be able to get its metadata.- Specified by:
getMetadatain classAbstractModelPort<Void>- Parameters:
model- the model object- Returns:
- the metadata
-
getFactory
public LogicalPortFactory<? extends AbstractModelPort<?>> getFactory()
Description copied from class:LogicalPortReturns the factory that knows how to create ports of this type- Specified by:
getFactoryin classAbstractModelPort<Void>- Returns:
- the factory that knows how to create ports of this type
-
getMetadataType
public Class<? extends PortMetadata> getMetadataType()
Description copied from class:LogicalPortReturns the class of metadata that this port uses- Specified by:
getMetadataTypein classLogicalPort- Returns:
- the class of metadata that this port uses
-
signalDone
public void signalDone(ExecutionContext ctx)
Signals downstream operators that we are done- Parameters:
ctx- the execution context
-
waitDone
public void waitDone(ExecutionContext ctx)
Waits until upstream operator has sent the done signal- Parameters:
ctx- the execution context
-
getOutput
public static DoneSignalPort getOutput(LogicalOperator op)
Returns the done signal port from the given operator if it defines one, throwing an exception if none found- Parameters:
op- the operator- Returns:
- the done signal port
-
-