Class ReplayDatabase

All Implemented Interfaces:
Database

public class ReplayDatabase
extends DatabaseWrapper
Database implementation that automatically opens historical tables in lieu of intraday tables, and adds a clock filter to replay according to the specified clock and sortedness.
  • Constructor Details

    • ReplayDatabase

      public ReplayDatabase​(com.fishlib.io.logger.Logger log, @NotNull Database database, @NotNull com.fishlib.base.clock.Clock clock, boolean sorted)
  • Method Details

    • getIntradayTableV2

      public Table getIntradayTableV2​(@NotNull String namespace, @NotNull String tableName, boolean live)
      Description copied from interface: Database
      Retrieves an intraday table by namespace and name. Throws exceptions for unknown tables.
      Specified by:
      getIntradayTableV2 in interface Database
      Overrides:
      getIntradayTableV2 in class DatabaseWrapper
      Parameters:
      namespace - namespace of the table
      tableName - name of the table
      live - true if the table should be live/updating; false otherwise
      Returns:
      intraday table
    • getIntradayTableV2

      public Table getIntradayTableV2​(@NotNull String namespace, @NotNull String tableName, @NotNull String internalPartitionValue, boolean live)
      Description copied from interface: Database
      Retrieves a single internal partition of the specified intraday table. The result may contain locations for multiple column partition values, and so a subsequent filter (e.g. on "Date") will often be desired.

      Throws exceptions for unknown tables.

      Parameters:
      namespace - namespace of the table
      tableName - name of the table
      internalPartitionValue - locations will be restricted to this internal partition value
      live - true if the table should be live/updating; false otherwise
      Returns:
      single partition intraday table