Class ReplayDatabase
- All Implemented Interfaces:
- Database
- Direct Known Subclasses:
- WritableReplayDatabase
ClockFilters to liveTables before
 returning them to the user. This can be used to operate a persistent query as if it were running from a prior day's
 data for debugging, performance testing, or demos.- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from interface io.deephaven.enterprise.database.DatabasePARTITIONED_TABLE_INTERNAL_PARTITION_COLUMN
- 
Constructor SummaryConstructorsConstructorDescriptionReplayDatabase(@NotNull Clock replayClock, @NotNull Database wrapped, io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.databases.ReplaySettings replaySettings, @NotNull ReplayConfiguration replayConfiguration) Create a new ReplayDatabase that wraps an underlying database.
- 
Method SummaryModifier and TypeMethodDescriptionvoidClear the location cache for all tables.voidclearLocationCache(@NotNull String namespace, @NotNull String tableName) Clear the location cache for the specified table.Retrieve a table containing the tables that exist in this database.Get the available namespaces.getTableDefinition(@NotNull String namespace, @NotNull String tableName) Fetch aTableDefinitionfrom the database.getTableDefinitionTable(@NotNull String namespace, @NotNull String tableName) Fetch a table's definition table from the database.getTableNames(String namespace) Get the tables within a namespacehistoricalPartitionedTable(@NotNull String namespace, @NotNull String tableName, @NotNull TableOptions options) Retrieve the specified historical table as aPartitionedTablefrom the Database.historicalTable(@NotNull String namespace, @NotNull String tableName, @NotNull TableOptions options) Fetch a static historicalTablefrom the database.livePartitionedTable(@NotNull String namespace, @NotNull String tableName, @NotNull TableOptions options) Retrieve the specified live table as aPartitionedTablefrom the Database.liveTable(@NotNull String namespace, @NotNull String tableName, @NotNull TableOptions options) Fetch a liveTablefor the specified namespace and table name.voiduseLocationCaches(boolean useCaching) Set whether the database should cache the result of table location discovery and re-use them.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.enterprise.database.DatabasehistoricalPartitionedTable, historicalTable, livePartitionedTable, liveTable
- 
Constructor Details- 
ReplayDatabasepublic ReplayDatabase(@NotNull @NotNull Clock replayClock, @NotNull @NotNull Database wrapped, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.databases.ReplaySettings replaySettings, @NotNull @NotNull ReplayConfiguration replayConfiguration) Create a new ReplayDatabase that wraps an underlying database.The Database.liveTable(String, String, TableOptions)andDatabase.livePartitionedTable(String, String, TableOptions)are wrapped to present existing data as ticking data. TheDatabase.historicalTable(String, String)family of methods are not changed.Tables must have a column of type InstantorZonedDateTimeto use as a timestamp source. If a table has multiple timestamps, then theReplayConfigurationImplmust define the name of the Timestamp column for that table. When launched from a Persistent Query, theReplayConfigurationImplTimestamp columns are derived from properties of the form (in descending priority):- ReplayDatabase.TimestampColumn.Namespace.TableName
- ReplayDatabase.TimestampColumn.Namespace
- ReplayDatabase.TimestampColumn
 All historical tables are read from the historical store, for a live table the default is to read the historical store and replay the historical table. Alternatively, live tables can read from live tables on the replay date based on the ReplayConfigurationImpl. When launched from a Persistent Query, theReplayConfigurationImplvalues are derived from properties of the form (in descending priority):- ReplayDatabase.UseIntraday.Namespace.TableName
- ReplayDatabase.UseIntraday.Namespace
- ReplayDatabase.UseIntraday
 - Parameters:
- replayClock- the clock for replaying data
- wrapped- the Database to wrap
- replaySettings- the replay settings from the persistent query
- replayConfiguration- the per-table replay configuration
 
 
- 
- 
Method Details- 
liveTablepublic Table liveTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull @NotNull TableOptions options) Description copied from interface:DatabaseFetch a liveTablefor the specified namespace and table name.- Specified by:
- liveTablein interface- Database
- Parameters:
- namespace- the Namespace in which the table exists
- tableName- the name of the table in the Namespace.
- options- a- TableOptionsto set table options.
- Returns:
- a new live Tablefor the specified parameters.
 
- 
livePartitionedTablepublic PartitionedTable livePartitionedTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull @NotNull TableOptions options) Description copied from interface:DatabaseRetrieve the specified live table as aPartitionedTablefrom the Database. The partitioned table's key columns will be its column and internal partitions.- Specified by:
- livePartitionedTablein interface- Database
- Parameters:
- namespace- the Namespace in which the table exists
- tableName- the name of the table in the Namespace.
- options- a- TableOptionsto set table options.
- Returns:
- a new PartitionedTablefor the specified table
 
- 
historicalTablepublic Table historicalTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull @NotNull TableOptions options) Description copied from interface:DatabaseFetch a static historicalTablefrom the database.- Specified by:
- historicalTablein interface- Database
- Parameters:
- namespace- the Namespace in which the table exists
- tableName- the name of the table in the Namespace.
- options- a- TableOptionsto set table options.
- Returns:
- a new static Tablefor the specified parameters.
 
- 
historicalPartitionedTablepublic PartitionedTable historicalPartitionedTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull @NotNull TableOptions options) Description copied from interface:DatabaseRetrieve the specified historical table as aPartitionedTablefrom the Database. The result'skey columnswill be derived from the table's partitioning columns as well as any internal partitions.- Specified by:
- historicalPartitionedTablein interface- Database
- Parameters:
- namespace- the Namespace in which the table exists
- tableName- the name of the table in the Namespace.
- options- a- TableOptionsto set table options.
- Returns:
- a new PartitionedTablefor the specified table
 
- 
getTableDefinitionpublic TableDefinition getTableDefinition(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName) Description copied from interface:DatabaseFetch aTableDefinitionfrom the database.- Specified by:
- getTableDefinitionin interface- Database
- Parameters:
- namespace- the Namespace in which the table exists
- tableName- the name of the table in the Namespace.
- Returns:
- the TableDefinitionfor the specified parameters.
 
- 
getTableDefinitionTablepublic Table getTableDefinitionTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName) Description copied from interface:DatabaseFetch a table's definition table from the database.- Specified by:
- getTableDefinitionTablein interface- Database
- Parameters:
- namespace- the Namespace in which the table exists
- tableName- the name of the table in the Namespace.
- Returns:
- a Tableof the column definitions for the specified parameters.
 
- 
getNamespacesDescription copied from interface:DatabaseGet the available namespaces.- Specified by:
- getNamespacesin interface- Database
- Returns:
- the list of namespaces
 
- 
getTableNamesDescription copied from interface:DatabaseGet the tables within a namespace- Specified by:
- getTableNamesin interface- Database
- Parameters:
- namespace- the namespace to interrogate
- Returns:
- the list of tables within namespace
 
- 
getCatalogTableDescription copied from interface:DatabaseRetrieve a table containing the tables that exist in this database.The returned table has a column for "Namespace", "Tablename" and "NamespaceSet". - Specified by:
- getCatalogTablein interface- Database
- Returns:
- a table containing the tables that exist in this database.
 
- 
clearLocationCachepublic void clearLocationCache()Description copied from interface:DatabaseClear the location cache for all tables. Use this method when some data has been replaced for a table to refresh the location cache and read the replaced data.Subsequent calls to Database.historicalTable(String, String),Database.liveTable(String, String)and their variants for all tables will repeat location discovery, which can have significant negative performance consequences.Note that you may also disable caching entirely using Database.useLocationCaches(boolean)- Specified by:
- clearLocationCachein interface- Database
 
- 
clearLocationCachepublic void clearLocationCache(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName) Description copied from interface:DatabaseClear the location cache for the specified table. Use this method when some data has been replaced for a table to refresh the location cache and read the replaced data.Subsequent calls to Database.historicalTable(String, String),Database.liveTable(String, String)and their variants for this table will repeat location discovery, which can have significant negative performance consequencesNote that you may also disable caching entirely using Database.useLocationCaches(boolean)- Specified by:
- clearLocationCachein interface- Database
- Parameters:
- namespace- namespace of table to clear cache
- tableName- table name of table to clear cache
 
- 
useLocationCachespublic void useLocationCaches(boolean useCaching) Description copied from interface:DatabaseSet whether the database should cache the result of table location discovery and re-use them. This defaults totrue- Specified by:
- useLocationCachesin interface- Database
- Parameters:
- useCaching- if location caches should be used.
 
 
-