Class TableBackedDataIndex

All Implemented Interfaces:
LogOutputAppendable, LivenessManager, LivenessNode, LivenessReferent, BasicDataIndex, DataIndex, Serializable

public class TableBackedDataIndex extends AbstractDataIndex
This class creates a possibly-refreshing AbstractDataIndex for a table. At its core, the index is a Table containing the key column(s) and the RowSets that contain these values.
See Also:
  • Constructor Details

    • TableBackedDataIndex

      public TableBackedDataIndex(@NotNull @NotNull QueryTable sourceTable, @NotNull @NotNull String... keyColumnNames)
  • Method Details

    • keyColumnNames

      @NotNull public @NotNull List<String> keyColumnNames()
      Description copied from interface: BasicDataIndex
      Get a list of the key column names for the index table.
      Returns:
      The key column names
    • keyColumnNamesByIndexedColumn

      @NotNull public @NotNull Map<ColumnSource<?>,String> keyColumnNamesByIndexedColumn()
      Description copied from interface: BasicDataIndex
      Get a map from indexed ColumnSources to key column names for the index table. This map must be ordered in the same order presented by BasicDataIndex.keyColumnNames() and used for lookup keys.
      Returns:
      A map designating the key column names for each indexed ColumnSource
    • table

      @NotNull public @NotNull Table table()
      Description copied from interface: BasicDataIndex
      Get the Table backing this data index.
      Returns:
      The Table
    • rowKeyLookup

      @NotNull public @NotNull DataIndex.RowKeyLookup rowKeyLookup()
      Description copied from interface: DataIndex
      Build a lookup function of row keys for this index. If BasicDataIndex.isRefreshing() is true, this lookup function is only guaranteed to be accurate for the current cycle. Lookup keys should be in the order of the index's key columns.
      Returns:
      A function that provides map-like lookup of index BasicDataIndex.table() row keys from an index lookup key
    • isRefreshing

      public boolean isRefreshing()
      Description copied from interface: BasicDataIndex
      Whether the index BasicDataIndex.table() is refreshing. Some transformations will force the index to become static even when the source table is refreshing.
      Returns:
      true if the index BasicDataIndex.table() is refreshing, false otherwise
    • isValid

      public boolean isValid()
      Description copied from class: AbstractDataIndex
      Whether this AbstractDataIndex is potentially usable. This will return true when there are no known issues for this data index. This performs fast checks, such as verifying all locations have index table files, but does not fully guarantee that the index is complete and loadable.
      Specified by:
      isValid in class AbstractDataIndex
      Returns:
      true If the AbstractDataIndex is potentially usable, false otherwise