Class AbstractInlet<I>

java.lang.Object
swim.streamlet.AbstractInlet<I>
All Implemented Interfaces:
Inlet<I>
Direct Known Subclasses:
OutletInlet, RecordFieldUpdater, StreamletInlet, ValueOutput, WatchValueOperator

public abstract class AbstractInlet<I> extends Object implements Inlet<I>
  • Field Details

    • input

      protected Outlet<? extends I> input
    • version

      protected int version
  • Constructor Details

    • AbstractInlet

      public AbstractInlet()
  • Method Details

    • input

      public Outlet<? extends I> input()
      Description copied from interface: Inlet
      Returns the Outlet from which this Inlet acquires its state; returns null if this Inlet is disconnected.
      Specified by:
      input in interface Inlet<I>
    • bindInput

      public void bindInput(Outlet<? extends I> input)
      Description copied from interface: Inlet
      Connects this Inlet to an Outlet from which it will acquire its state. If this Inlet is already connected, it will first disconnect from its existing input. Then, after updating its input property, the Inlet will invoke Outlet.bindOutput(Inlet) on its new input.
      Specified by:
      bindInput in interface Inlet<I>
    • unbindInput

      public void unbindInput()
      Description copied from interface: Inlet
      Disconnects this Inlet from its input Outlet, if connected. After setting its input property to null, the Inlet will invoke Outlet.unbindOutput(Inlet) on its old input, if defined.
      Specified by:
      unbindInput in interface Inlet<I>
    • disconnectInputs

      public void disconnectInputs()
      Description copied from interface: Inlet
      Disconnects all Inlets dominated by this Inlet in the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at this Inlet.
      Specified by:
      disconnectInputs in interface Inlet<I>
    • disconnectOutputs

      public void disconnectOutputs()
      Description copied from interface: Inlet
      Disconnects all Outlets dominated by this Inlet in the dataflow graph. Used to recursively clean up chains of combinators passing through this Inlet.
      Specified by:
      disconnectOutputs in interface Inlet<I>
    • decohereOutput

      public void decohereOutput()
      Description copied from interface: Inlet
      Marks this Inlet—and the Streamlet to which this Inlet is attached—as having decoherent state. Decohering an Inlet will recursively decohere all streamlets that transitively depend on the state of this Inlet. Decohering an Inlet does not cause its state to be recomputed. A subsequent Inlet.recohereOutput(int) call will eventually make the state of the Inlet coherent again.
      Specified by:
      decohereOutput in interface Inlet<I>
    • recohereOutput

      public void recohereOutput(int version)
      Description copied from interface: Inlet
      Updates the state of this Inlet to make it consistent with the target version. The Inlet only needs to update if its current version differs from the target version. To update its state, the Inlet first invokes Outlet.recohereInput(int) on its input, to ensure that its input is coherent. It then invokes Streamlet.recohere(int) on the Streamlet to which it's attached, causing the Streamlet to make its own state coherent again.
      Specified by:
      recohereOutput in interface Inlet<I>
    • willDecohereOutput

      protected void willDecohereOutput()
    • onDecohereOutput

      protected void onDecohereOutput()
    • didDecohereOutput

      protected void didDecohereOutput()
    • willRecohereOutput

      protected void willRecohereOutput(int version)
    • onRecohereOutput

      protected void onRecohereOutput(int version)
    • didRecohereOutput

      protected void didRecohereOutput(int version)