Class ExternalInputEnumeratorNode

All Implemented Interfaces:
IQueryRuntimeContextListener, Disconnectable, NetworkStructureChangeSensitiveNode, Node, Receiver, Supplier

public class ExternalInputEnumeratorNode extends StandardNode implements Disconnectable, Receiver, IQueryRuntimeContextListener
An input node representing an enumerable extensional input relation and receiving external updates.

Contains those tuples that are in the extensional relation identified by the input key, and also conform to the global seed (if any).

  • Field Details

    • mailbox

      protected final Mailbox mailbox
      Since:
      1.6
  • Constructor Details

    • ExternalInputEnumeratorNode

      public ExternalInputEnumeratorNode(ReteContainer reteContainer)
  • Method Details

    • instantiateMailbox

      protected Mailbox instantiateMailbox()
      Instantiates the Mailbox of this receiver. Subclasses may override this method to provide their own mailbox implementation.
      Returns:
      the mailbox
      Since:
      2.0
    • getMailbox

      public Mailbox getMailbox()
      Description copied from interface: Receiver
      Returns the Mailbox of this receiver.
      Specified by:
      getMailbox in interface Receiver
      Returns:
      the mailbox
    • connectThroughContext

      public void connectThroughContext(ReteEngine engine, IInputKey inputKey, Tuple globalSeed)
    • disconnect

      public void disconnect()
      Description copied from interface: Disconnectable
      Disconnects this rete engine component from the underlying model. Disconnecting enables the garbage collection mechanisms to dispose of the rete network.
      Specified by:
      disconnect in interface Disconnectable
    • getTuplesInternal

      protected Iterable<Tuple> getTuplesInternal()
      Since:
      2.2
    • pullInto

      public void pullInto(Collection<Tuple> collector, boolean flush)
      Description copied from interface: Supplier
      Pulls the contents of this object in this particular moment into a target collection.
      Specified by:
      pullInto in interface Supplier
      Parameters:
      flush - if true, flushing of messages is allowed during the pull, otherwise flushing is not allowed
    • pullIntoWithTimeline

      public void pullIntoWithTimeline(Map<Tuple,Timeline<Timestamp>> collector, boolean flush)
      Specified by:
      pullIntoWithTimeline in interface Supplier
    • update

      public void update(IInputKey key, Tuple update, boolean isInsertion)
      Specified by:
      update in interface IQueryRuntimeContextListener
    • update

      public void update(Direction direction, Tuple updateElement, Timestamp timestamp)
      Description copied from interface: Receiver
      Updates the receiver with a newly found or lost partial matching.
      Specified by:
      update in interface Receiver
    • appendParent

      public void appendParent(Supplier supplier)
      Description copied from interface: Receiver
      appends a parent that will continuously send insert and revoke updates to this supplier
      Specified by:
      appendParent in interface Receiver
    • removeParent

      public void removeParent(Supplier supplier)
      Description copied from interface: Receiver
      removes a parent
      Specified by:
      removeParent in interface Receiver
    • getParents

      public Collection<Supplier> getParents()
      Description copied from interface: Receiver
      access active parent
      Specified by:
      getParents in interface Receiver
    • getInputKey

      public IInputKey getInputKey()
    • getGlobalSeed

      public Tuple getGlobalSeed()