Interface OperatorComposable

All Known Subinterfaces:
CompositionContext, DeferredCompositionContext, LogicalGraph, LogicalSubgraph
All Known Implementing Classes:
OpenComposite, OpenModelSink, OpenModelSource, OpenMultiModelSink, OpenMultiModelSource, OpenMultiRecordSink, OpenMultiRecordSource, OpenRecordSink, OpenRecordSource

public interface OperatorComposable
Base interface for any context/graph that allows operators to be added and ports to be connected.
  • Method Summary

    Modifier and Type
    Method
    Description
    <O extends LogicalOperator>
    O
    add(O op)
    Add a LogicalOperator to this graph, using the short class name as the name of the operator.
    <O extends LogicalOperator>
    O
    add(O op, OperatorSettings settings)
    Add a LogicalOperator to this graph, specifying advanced operator settings.
    <O extends LogicalOperator>
    O
    add(O op, String name)
    Add a LogicalOperator to this graph, specifying a name of the operator.
    <P extends LogicalPort>
    void
    connect(P from, P to)
    Connect two ports together.
  • Method Details

    • add

      <O extends LogicalOperator> O add(O op)
      Add a LogicalOperator to this graph, using the short class name as the name of the operator.
      Type Parameters:
      O - the type of the operator.
      Parameters:
      op - the operator to add to the graph.
      Returns:
      the same operator that was passed to this method
    • add

      <O extends LogicalOperator> O add(O op, String name)
      Add a LogicalOperator to this graph, specifying a name of the operator.
      Type Parameters:
      O - the type of the operator.
      Parameters:
      op - the operator to add to the graph.
      name - the name of the the operator
      Returns:
      the same operator that was passed to this method
    • add

      <O extends LogicalOperator> O add(O op, OperatorSettings settings)
      Add a LogicalOperator to this graph, specifying advanced operator settings.
      Type Parameters:
      O - the type of the operator.
      Parameters:
      op - the operator to add to the graph.
      settings - operators settings, contains name and other configuration options.
      Returns:
      the same operator that was passed to this method
    • connect

      <P extends LogicalPort> void connect(P from, P to)
      Connect two ports together. Depending in the specific context, the source and target operators may be one of the following pairs:
      1. From an output port of an operator that was added to this context to an input port of an operator that was added to this context
      2. From an input port of the CompositeOperator to an input port of an operator that was added to this context. (Applies to CompositeOperator.compose(com.pervasive.datarush.operators.CompositionContext)).
      3. From an output port of an operator that was added to this context to an output port of the CompositeOperator. (Applies to CompositeOperator.compose(com.pervasive.datarush.operators.CompositionContext)).

      Note on port types: connecting mixed type ports will generally fail when the graph is compiled.

      Note that ports do not store connection information; rather, connection information is stored externally within this context.

      Type Parameters:
      P - the type of port
      Parameters:
      from - the source port
      to - the target port