org.eclipse.viatra.query.runtime.rete.network.indexer

## Class GroupBasedMessageIndexer

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.indexer.GroupBasedMessageIndexer

- All Implemented Interfaces:
    Clearable, MessageIndexer

      public class GroupBasedMessageIndexer
      extends java.lang.Object
      implements MessageIndexer

  Since:
    2.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TupleMask` | `groupMask`
    `protected java.util.Map<Tuple,DefaultMessageIndexer>` | `indexer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupBasedMessageIndexer(TupleMask groupMask)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clear all partial matchings stored in memory
    `void` | `delete(Tuple update)`
    `int` | `getCount(Tuple update)`
    `java.util.Set<Tuple>` | `getGroups()`
    `java.util.Map<Tuple,java.lang.Integer>` | `getTuplesByGroup(Tuple group)`
    `void` | `insert(Tuple update)`
    `boolean` | `isEmpty()`
    `void` | `update(Tuple update, int delta)`

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

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

- - ### Field Detail

    - #### indexer

          protected final java.util.Map<Tuple,DefaultMessageIndexer> indexer

    - #### groupMask

          protected final TupleMask groupMask

  - ### Constructor Detail

    - #### GroupBasedMessageIndexer

          public GroupBasedMessageIndexer(TupleMask groupMask)

  - ### Method Detail

    - #### getTuplesByGroup

          public java.util.Map<Tuple,java.lang.Integer> getTuplesByGroup(Tuple group)

    - #### getCount

          public int getCount(Tuple update)

      Specified by:
        `getCount` in interface `MessageIndexer`

    - #### getGroups

          public java.util.Set<Tuple> getGroups()

    - #### insert

          public void insert(Tuple update)

      Specified by:
        `insert` in interface `MessageIndexer`

    - #### delete

          public void delete(Tuple update)

      Specified by:
        `delete` in interface `MessageIndexer`

    - #### update

          public void update(Tuple update,
                             int delta)

      Specified by:
        `update` in interface `MessageIndexer`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `MessageIndexer`

    - #### clear

          public void clear()

      Description copied from interface: `Clearable`
      Clear all partial matchings stored in memory
      Specified by:
        `clear` in interface `Clearable`