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

## Class DiscriminatorBucketNode

- 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.DiscriminatorBucketNode

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

      public class DiscriminatorBucketNode
      extends SingleInputNode

  A bucket holds a filtered set of tuples of its parent `DiscriminatorDispatcherNode`. Exactly those that have the given bucket key at their discrimination column.

  During operation, 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
    `DiscriminatorBucketNode(ReteContainer reteContainer, java.lang.Object bucketKey)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendParent(Supplier supplier)` appends a parent that will continously send insert and revoke updates to this supplier
    `java.lang.Object` | `getBucketKey()`
    `DiscriminatorDispatcherNode` | `getDispatcher()`
    `void` | `pullInto(java.util.Collection<Tuple> collector)` pulls the contents of this object in this particular moment into a target collection
    `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

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

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

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

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

      `appendChild, constructIndex, getPulledContents, getReceivers, removeChild`

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

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

- - ### Constructor Detail

    - #### DiscriminatorBucketNode

          public DiscriminatorBucketNode(ReteContainer reteContainer,
                                         java.lang.Object bucketKey)

      Parameters:
        `bucketKey` - will be wrapped using `IQueryRuntimeContext.wrapElement(Object)`

  - ### Method Detail

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

    - #### update

          public void update(Direction direction,
                             Tuple updateElement)

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

    - #### getBucketKey

          public java.lang.Object getBucketKey()

    - #### appendParent

          public void appendParent(Supplier supplier)

      Description copied from interface: `Receiver`
      appends a parent that will continously send insert and revoke updates to this supplier
      Specified by:
        `appendParent` in interface `Receiver`
      Overrides:
        `appendParent` in class `SingleInputNode`

    - #### getDispatcher

          public DiscriminatorDispatcherNode getDispatcher()

    - #### 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`