Package org.eclipse.viatra.query.runtime.rete.index

## Interface Indexer

- All Superinterfaces:
    `Node`
  All Known Subinterfaces:
    `IterableIndexer`, `ProjectionIndexer`
  All Known Implementing Classes:
    `AbstractColumnAggregatorNode.AggregatorOuterIdentityIndexer`, `AbstractColumnAggregatorNode.AggregatorOuterIndexer`, `GenericProjectionIndexer`, `IdentityIndexer`, `IndexerWithMemory`, `MemoryIdentityIndexer`, `MemoryNullIndexer`, `NullIndexer`, `OnetimeIndexer`, `SpecializedProjectionIndexer`, `StandardIndexer`, `TransitiveClosureNodeIndexer`

      public interface Indexer
      extends Node

  A node that indexes incoming Tuples by their signatures as specified by a TupleMask. Notifies listeners about such update events through the IndexerListener. Signature tuples are created by transforming the update tuples using the mask. Tuples stored with the same signature are grouped together. The group or a reduction thereof is retrievable.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `attachListener​(IndexerListener listener)` |
    `void` | `detachListener​(IndexerListener listener)` |
    `java.util.Collection<Tuple>` | `get​(Tuple signature)` |
    `Node` | `getActiveNode()` | This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot allotted to it).
    `java.util.Collection<IndexerListener>` | `getListeners()` |
    `TupleMask` | `getMask()` |
    `Supplier` | `getParent()` |
    `default java.util.Map<Tuple,​Timeline<Timestamp>>` | `getTimeline​(Tuple signature)` |

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

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

- - ### Method Detail

    - #### getMask

          TupleMask getMask()

      Returns:
        the mask by which the contents are indexed.

    - #### getParent

          Supplier getParent()

      Returns:
        the node whose contents are indexed.

    - #### get

          java.util.Collection<Tuple> get​(Tuple signature)

      Returns:
        all stored tuples that conform to the specified signature, null if there are none such. CONTRACT: do not modify!

    - #### getTimeline

          default java.util.Map<Tuple,​Timeline<Timestamp>> getTimeline​(Tuple signature)

      Since:
        2.4

    - #### getActiveNode

          Node getActiveNode()

      This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot allotted to it). The active node is typically the indexer itself, but it can be a different node such as its parent.
      Returns:
        the active node that operates this indexer

    - #### getListeners

          java.util.Collection<IndexerListener> getListeners()

    - #### attachListener

          void attachListener​(IndexerListener listener)

    - #### detachListener

          void detachListener​(IndexerListener listener)