org.eclipse.viatra.query.runtime.rete.boundary

## Class ExternalInputEnumeratorNode

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.BaseNode
  - - org.eclipse.viatra.query.runtime.rete.network.StandardNode
    - - org.eclipse.viatra.query.runtime.rete.boundary.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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Mailbox` | `mailbox`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode

      `childMailboxes, children`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `nodeId, reteContainer, tag, traceInfos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExternalInputEnumeratorNode(ReteContainer reteContainer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendParent(Supplier supplier)` appends a parent that will continuously send insert and revoke updates to this supplier
    `void` | `connectThroughContext(ReteEngine engine, IInputKey inputKey, Tuple globalSeed)`
    `void` | `disconnect()` Disconnects this rete engine component from the underlying model.
    `Tuple` | `getGlobalSeed()`
    `IInputKey` | `getInputKey()`
    `Mailbox` | `getMailbox()` Returns the `Mailbox` of this receiver.
    `java.util.Collection<Supplier>` | `getParents()` access active parent
    `protected java.lang.Iterable<Tuple>` | `getTuplesInternal()`
    `protected Mailbox` | `instantiateMailbox()` Instantiates the `Mailbox` of this receiver.
    `void` | `pullInto(java.util.Collection<Tuple> collector, boolean flush)` Pulls the contents of this object in this particular moment into a target collection.
    `void` | `pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)`
    `void` | `removeParent(Supplier supplier)` removes a parent
    `void` | `update(Direction direction, Tuple updateElement, Timestamp timestamp)` updates the receiver with a newly found or lost partial matching
    `void` | `update(IInputKey key, Tuple update, boolean isInsertion)` The given tuple was inserted into or removed from the input relation indicated by the given key.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode

      `appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChild`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `acceptPropagatedTraceInfo, assignTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Node

      `acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Supplier

      `getPulledContents`

- - ### Field Detail

    - #### mailbox

          protected final Mailbox mailbox

      Since:
        1.6

  - ### Constructor Detail

    - #### ExternalInputEnumeratorNode

          public ExternalInputEnumeratorNode(ReteContainer reteContainer)

  - ### Method Detail

    - #### 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 java.lang.Iterable<Tuple> getTuplesInternal()

      Since:
        2.2

    - #### pullInto

          public void pullInto(java.util.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`
        `flush` - if true, flushing of messages is allowed during the pull, otherwise flushing is not allowed

    - #### pullIntoWithTimeline

          public void pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector,
                                           boolean flush)

      Specified by:
        `pullIntoWithTimeline` in interface `Supplier`

    - #### update

          public void update(IInputKey key,
                             Tuple update,
                             boolean isInsertion)

      Description copied from interface: `IQueryRuntimeContextListener`
      The given tuple was inserted into or removed from the input relation indicated by the given key.
      Specified by:
        `update` in interface `IQueryRuntimeContextListener`
      Parameters:
        `key` - the key identifying the input relation that was updated
        `update` - the tuple that was inserted or removed
        `isInsertion` - true if it was an insertion, false otherwise.

    - #### 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 java.util.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()