Class RowSetIndexer

java.lang.Object
io.deephaven.engine.table.impl.indexer.RowSetIndexer
All Implemented Interfaces:
TrackingRowSet.Indexer

public class RowSetIndexer extends Object implements TrackingRowSet.Indexer
Indexer that provides "grouping" information based on key values extracted from a TupleSource, linked to a TrackingRowSet.
ApiNote:
RowSetIndexers should not be used after the host TrackingRowSet has been closed.
  • Constructor Details

    • RowSetIndexer

      public RowSetIndexer(@NotNull @NotNull TrackingRowSet rowSet)
  • Method Details

    • of

      public static RowSetIndexer of(TrackingRowSet rowSet)
    • rowSetChanged

      public void rowSetChanged()
      Description copied from interface: TrackingRowSet.Indexer
      Callback for the host TrackingRowSet to report a modification that may invalidate cached indexing information.
      Specified by:
      rowSetChanged in interface TrackingRowSet.Indexer
    • hasGrouping

      public boolean hasGrouping(ColumnSource... keyColumns)
    • getGrouping

      public Map<Object,RowSet> getGrouping(TupleSource tupleSource)
    • getPrevGrouping

      public Map<Object,RowSet> getPrevGrouping(TupleSource tupleSource)
    • copyImmutableGroupings

      public void copyImmutableGroupings(TupleSource source, TupleSource dest)
    • getGroupingForKeySet

      public Map<Object,RowSet> getGroupingForKeySet(Set<Object> keys, TupleSource tupleSource)
      Return a grouping that contains row keys that match the values in keys.
      Parameters:
      keys - A set of values that TupleSource should match. For a single ColumnSource, the values within the set are the values that we would like to find. For compound TupleSource instances, the values are SmartKeys.
      tupleSource - The tuple factory for singular or compound keys
      Returns:
      A map from keys to RowSet, for each of the keys present in the indexed RowSet's view of tupleSource
    • getSubSetForKeySet

      public RowSet getSubSetForKeySet(Set<Object> keys, TupleSource tupleSource)
      Return a subset that contains row keys that match the values in keys.
      Parameters:
      keys - A set of values that TupleSource should match. For a single ColumnSource, the values within the set are the values that we would like to find. For compound TupleSource instances, the values are SmartKeys.
      tupleSource - The tuple factory for singular or compound keys
      Returns:
      A WritableRowSet with all row keys from the indexed RowSet whose value in tupleSource was present in keys