Class DatabaseImpl

java.lang.Object
io.deephaven.enterprise.database.impl.DatabaseImpl
All Implemented Interfaces:
AclSupport, Database, DatabaseInternal

public class DatabaseImpl extends Object implements DatabaseInternal, AclSupport
A basic implementation of the Database interface.
  • Constructor Details

    • DatabaseImpl

      public DatabaseImpl(@NotNull @NotNull TableDataService tableDataService, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaService schemaService, @NotNull @NotNull GroupProvider groupProvider, @NotNull @NotNull SourceAclProvider sourceAclProvider, @NotNull @NotNull io.deephaven.enterprise.auth.UserContext userContext, @NotNull @NotNull io.deephaven.enterprise.auth.audit.AuditEventLogger auditEventLogger)
  • Method Details

    • liveTable

      public Table liveTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, boolean isRefreshing)
      Description copied from interface: Database
      Fetch a live Table for the specified namespace and table name.
      Specified by:
      liveTable in interface AclSupport
      Specified by:
      liveTable in interface Database
      Parameters:
      namespace - the Namespace in which the table exists
      tableName - the name of the table in the Namespace.
      isRefreshing - true if the returned table should be refreshing
      Returns:
      a new live Table for the specified parameters.
    • historicalTable

      public Table historicalTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName)
      Description copied from interface: Database
      Fetch a static historical Table from the database.
      Specified by:
      historicalTable in interface AclSupport
      Specified by:
      historicalTable in interface Database
      Parameters:
      namespace - the Namespace in which the table exists
      tableName - the name of the table in the Namespace.
      Returns:
      a new static Table for the specified parameters.
    • getTableDefinition

      public TableDefinition getTableDefinition(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName)
      Description copied from interface: Database
      Fetch a TableDefinition from the database.
      Specified by:
      getTableDefinition in interface Database
      Parameters:
      namespace - the Namespace in which the table exists
      tableName - the name of the table in the Namespace.
      Returns:
      the TableDefinition for the specified parameters.
    • getTableDefinitionTable

      public Table getTableDefinitionTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName)
      Description copied from interface: Database
      Fetch a table's definition table from the database.
      Specified by:
      getTableDefinitionTable in interface Database
      Parameters:
      namespace - the Namespace in which the table exists
      tableName - the name of the table in the Namespace.
      Returns:
      a Table of the column definitions for the specified parameters.
    • getNamespaces

      public Collection<String> getNamespaces()
      Description copied from interface: Database
      Get the available namespaces.
      Specified by:
      getNamespaces in interface Database
      Returns:
      the list of namespaces
    • getTableNames

      public Collection<String> getTableNames(@Nullable @Nullable String namespace)
      Description copied from interface: Database
      Get the tables within a namespace
      Specified by:
      getTableNames in interface Database
      Parameters:
      namespace - the namespace to interrogate
      Returns:
      the list of tables within namespace
    • getCatalogTable

      public Table getCatalogTable()
      Description copied from interface: Database
      Retrieve a table containing the tables that exist in this database.

      The returned table has a column for "Namespace", "Tablename" and "NamespaceSet".

      Specified by:
      getCatalogTable in interface Database
      Returns:
      a table containing the tables that exist in this database.
    • getUserContext

      @NotNull public @NotNull io.deephaven.enterprise.auth.UserContext getUserContext()
      Specified by:
      getUserContext in interface DatabaseInternal
    • getGroupProvider

      public GroupProvider getGroupProvider()
      Specified by:
      getGroupProvider in interface AclSupport
    • setCatalog

      public void setCatalog(@NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.databases.DatabaseCatalog databaseCatalog)
    • livePartitionedTable

      public PartitionedTable livePartitionedTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, boolean resultLive)
      Description copied from interface: Database
      Retrieve the specified live table as a PartitionedTable from the Database.
      Specified by:
      livePartitionedTable in interface Database
      Parameters:
      namespace - the Namespace in which the table exists
      tableName - the name of the table in the Namespace.
      resultLive - true if the returned partitioned table should be refreshing
      Returns:
      a new PartitionedTable for the specified table
    • historicalPartitionedTable

      public PartitionedTable historicalPartitionedTable(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName)
      Description copied from interface: Database
      Retrieve the specified historical table as a PartitionedTable from the Database.
      Specified by:
      historicalPartitionedTable in interface Database
      Parameters:
      namespace - the Namespace in which the table exists
      tableName - the name of the table in the Namespace.
      Returns:
      a new PartitionedTable for the specified table