Class 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.
  • Field Details

  • Method Details

    • 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 class AbstractModelPort<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 class AbstractModelPort<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 class LogicalPort
      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