- 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>
FACTORY
The 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 typeAbstractModelPortMetadata
getMetadata(Void model)
Returns the metadata associate with the model.Class<? extends PortMetadata>
getMetadataType()
Returns the class of metadata that this port usesstatic DoneSignalPort
getOutput(LogicalOperator op)
Returns the done signal port from the given operator if it defines one, throwing an exception if none foundvoid
signalDone(ExecutionContext ctx)
Signals downstream operators that we are donevoid
waitDone(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:AbstractModelPort
Returns the metadata associate with the model. (Given a model, we should always be able to get its metadata.- Specified by:
getMetadata
in classAbstractModelPort<Void>
- Parameters:
model
- the model object- Returns:
- the metadata
-
getFactory
public LogicalPortFactory<? extends AbstractModelPort<?>> getFactory()
Description copied from class:LogicalPort
Returns the factory that knows how to create ports of this type- Specified by:
getFactory
in classAbstractModelPort<Void>
- Returns:
- the factory that knows how to create ports of this type
-
getMetadataType
public Class<? extends PortMetadata> getMetadataType()
Description copied from class:LogicalPort
Returns the class of metadata that this port uses- Specified by:
getMetadataType
in 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
-
-