org.eclipse.viatra.query.runtime.rete.single

## Class DiscriminatorDispatcherNode

- 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.single.SingleInputNode
      - - org.eclipse.viatra.query.runtime.rete.single.DiscriminatorDispatcherNode

- All Implemented Interfaces:
    Node, Receiver, Supplier, Tunnel

      public class DiscriminatorDispatcherNode
      extends SingleInputNode

  Node that sends tuples off to different buckets (attached as children of type `DiscriminatorBucketNode`), based on the value of a given column.

  Tuple contents and bucket keys have already been wrapped using `IQueryRuntimeContext.wrapElement(Object)`

  Since:
    1.5

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.single.SingleInputNode

      `mailbox, parent`

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

      `children`

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

      `nodeId, reteContainer, tag, traceInfos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DiscriminatorDispatcherNode(ReteContainer reteContainer, int discriminationColumnIndex)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendChild(Receiver receiver)` appends a receiver that will continously receive insert and revoke updates from this supplier
    `int` | `getDiscriminationColumnIndex()`
    `void` | `pullInto(java.util.Collection<Tuple> collector)` pulls the contents of this object in this particular moment into a target collection
    `void` | `pullIntoFiltered(java.util.Collection<Tuple> collector, java.lang.Object bucketKey)`
    `void` | `removeChild(Receiver receiver)` removes a receiver
    `protected java.lang.String` | `toStringCore()` clients should override this to append before the tag / trace indicators
    `void` | `update(Direction direction, Tuple updateElement)` updates the receiver with a newly found or lost partial matching

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.single.SingleInputNode

      `appendParent, assignTraceInfo, getMailbox, getParents, instantiateMailbox, propagatePullInto, removeParent`

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

      `constructIndex, getPulledContents, getReceivers, issueError, propagateUpdate`

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

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

    - ### 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.Supplier

      `constructIndex, getPulledContents, getReceivers`

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

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

- - ### Constructor Detail

    - #### DiscriminatorDispatcherNode

          public DiscriminatorDispatcherNode(ReteContainer reteContainer,
                                             int discriminationColumnIndex)

      Parameters:
        `reteContainer` -

  - ### Method Detail

    - #### update

          public void update(Direction direction,
                             Tuple updateElement)

      Description copied from interface: `Receiver`
      updates the receiver with a newly found or lost partial matching

    - #### getDiscriminationColumnIndex

          public int getDiscriminationColumnIndex()

    - #### pullInto

          public void pullInto(java.util.Collection<Tuple> collector)

      Description copied from interface: `Supplier`
      pulls the contents of this object in this particular moment into a target collection

    - #### pullIntoFiltered

          public void pullIntoFiltered(java.util.Collection<Tuple> collector,
                                       java.lang.Object bucketKey)

    - #### appendChild

          public void appendChild(Receiver receiver)

      Description copied from interface: `Supplier`
      appends a receiver that will continously receive insert and revoke updates from this supplier
      Specified by:
        `appendChild` in interface `Supplier`
      Overrides:
        `appendChild` in class `StandardNode`

    - #### removeChild

          public void removeChild(Receiver receiver)

      Description copied from interface: `Supplier`
      removes a receiver
      Specified by:
        `removeChild` in interface `Supplier`
      Overrides:
        `removeChild` in class `StandardNode`

    - #### toStringCore

          protected java.lang.String toStringCore()

      Description copied from class: `BaseNode`
      clients should override this to append before the tag / trace indicators
      Overrides:
        `toStringCore` in class `BaseNode`