Package swim.dataflow

Class AbstractRecordOutlet

All Implemented Interfaces:
Comparable<Item>, Iterable<Item>, Collection<Item>, List<Item>, Debug, Display, RecordOutlet, MapOutlet<Value,Value,Record>, Outlet<Record>, StreamletScope<Value>, Builder<Item,Record>, PairBuilder<Value,Value,Record>
Direct Known Subclasses:
DownlinkRecord, RecordModel

public abstract class AbstractRecordOutlet extends Record implements RecordOutlet
  • Field Details

  • Constructor Details

    • AbstractRecordOutlet

      public AbstractRecordOutlet()
  • Method Details

    • streamletScope

      public StreamletScope<? extends Value> streamletScope()
      Description copied from interface: StreamletScope
      Returns the lexically scoped parent of this StreamletScope. Returns null if this StreamletScope has no lexical parent.
      Specified by:
      streamletScope in interface StreamletScope<Value>
    • streamletContext

      public StreamletContext streamletContext()
      Description copied from interface: StreamletScope
      Returns the environment in which this StreamletScope operates.
      Specified by:
      streamletContext in interface StreamletScope<Value>
    • containsOwnKey

      public boolean containsOwnKey(Value key)
    • keyIterator

      public abstract Iterator<Value> keyIterator()
      Description copied from interface: MapOutlet
      Returns an Iterator over the keys in the current state of this MapOutlet.
      Specified by:
      keyIterator in interface MapOutlet<Value,Value,Record>
      Overrides:
      keyIterator in class Record
    • get

      public Record get()
      Description copied from interface: Outlet
      Returns the current state of this Outlet.
      Specified by:
      get in interface Outlet<Record>
    • outlet

      public Outlet<Value> outlet(Value key)
      Description copied from interface: MapOutlet
      Returns an Outlet that updates when the specified key updates.
      Specified by:
      outlet in interface MapOutlet<Value,Value,Record>
      Specified by:
      outlet in interface RecordOutlet
    • outlet

      public Outlet<Value> outlet(String key)
      Description copied from interface: StreamletScope
      Returns an Outlet that updates when the specified key updates.
      Specified by:
      outlet in interface RecordOutlet
      Specified by:
      outlet in interface StreamletScope<Value>
    • outputIterator

      public Iterator<Inlet<? super Record>> outputIterator()
      Description copied from interface: Outlet
      Returns an Iterator over the set of Inlets that depend on the state of this Outlet.
      Specified by:
      outputIterator in interface Outlet<Record>
    • bindOutput

      public void bindOutput(Inlet<? super Record> output)
      Description copied from interface: Outlet
      Adds an output to the set of Inlets that depend on the state of this Outlet. The output will be decohered when the state of this Outlet is decohered, and recohered when this Outlet is recohered.
      Specified by:
      bindOutput in interface Outlet<Record>
    • unbindOutput

      public void unbindOutput(Inlet<? super Record> output)
      Description copied from interface: Outlet
      Removes an output from the set of Inlets that depend on the state of this Outlet.
      Specified by:
      unbindOutput in interface Outlet<Record>
    • unbindOutputs

      public void unbindOutputs()
      Description copied from interface: Outlet
      Disconnects all outputs from this Outlet by invoking Inlet.unbindInput() on each Inelt that depends on the state of this Outlet.
      Specified by:
      unbindOutputs in interface Outlet<Record>
    • disconnectOutputs

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

      public void disconnectInputs()
      Description copied from interface: Outlet
      Disconnects all Inlets dominated by this Outlet in the dataflow dependency graph. Used to recursively clean up chains of combinators passing through this Outlet.
      Specified by:
      disconnectInputs in interface Outlet<Record>
    • decohereInputKey

      public void decohereInputKey(Value key, KeyEffect effect)
      Description copied from interface: MapOutlet
      Marks this MapOutlet as needing an effect applied to a given key. Decohering an individual key decoheres the entire state of the Outlet. But only the decoherent keys need to be updated in order to recohere the overall state of the Outlet.
      Specified by:
      decohereInputKey in interface MapOutlet<Value,Value,Record>
    • decohereInput

      public void decohereInput()
      Description copied from interface: Outlet
      Marks this Outlet—and all outputs that depend on the state of this Outlet—as having decoherent state.
      Specified by:
      decohereInput in interface Outlet<Record>
    • recohereInputKey

      public void recohereInputKey(Value key, int version)
      Description copied from interface: MapOutlet
      Updates the state of an individual key in this MapOutlet to make it consistent with the target version. The MapOutlet only needs to update if its current version differs from the target version. To update the state of a key, the MapOutlet first invokes Streamlet.recohere(int) on its attached streamlets. Then, for each dependent output, it invokes MapInlet.recohereOutputKey(Object, int), if the dependent output is a MapInlet, or it invokes Inlet.recohereOutput(int), if the dependent output is not a MapInlet.
      Specified by:
      recohereInputKey in interface MapOutlet<Value,Value,Record>
    • recohereInput

      public void recohereInput(int version)
      Description copied from interface: Outlet
      Updates the state of this Outlet to make it consistent with the target version. The Outlet only needs to update if its current version differs from the target version. To update its state, the Outlet first invokes Streamlet.recohere(int) on the Streamlet to which it's attached. It then invokes Inlet.recohereOutput(int) on each of its dependent outputs.
      Specified by:
      recohereInput in interface Outlet<Record>
    • willDecohereInputKey

      protected void willDecohereInputKey(Value key, KeyEffect effect)
    • onDecohereInputKey

      protected void onDecohereInputKey(Value key, KeyEffect effect)
    • didDecohereInputKey

      protected void didDecohereInputKey(Value key, KeyEffect effect)
    • willDecohereInput

      protected void willDecohereInput()
    • onDecohereInput

      protected void onDecohereInput()
    • didDecohereInput

      protected void didDecohereInput()
    • willRecohereInputKey

      protected void willRecohereInputKey(Value key, KeyEffect effect, int version)
    • onRecohereInputKey

      protected void onRecohereInputKey(Value key, KeyEffect effect, int version)
    • didRecohereInputKey

      protected void didRecohereInputKey(Value key, KeyEffect effect, int version)
    • willRecohereInput

      protected void willRecohereInput(int version)
    • onRecohereInput

      protected void onRecohereInput(int version)
    • didRecohereInput

      protected void didRecohereInput(int version)