Interface SchemaInternal

All Superinterfaces:
Schema
All Known Implementing Classes:
DeephavenSchema

@InternalUseOnly public interface SchemaInternal extends Schema
This defines a complete schema, including additional metadata for import, logging, validation, and others. This interface is likely to change and is intended for internal use only.
  • Method Details

    • of

      static SchemaInternal of(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema legacySchema)
      Construct a SchemaInternal instance which delegates to a Legacy instance
      Parameters:
      legacySchema - a Legacy Schema instance to which we will delegate most work
      Returns:
      a new SchemaInternal instance
    • asInternal

      @NotNull @InternalUseOnly static @NotNull SchemaInternal asInternal(@Nullable @Nullable Schema schema)
      Attempts to cast a non-null Core+ Schema to a SchemaInternal. For internal use only. Throws SchemaException if the schema cannot be cast to a SchemaInternal
      Parameters:
      schema - a non-null Core+ Schema instance
      Returns:
      a SchemaInternal instance, if possible
    • maybeAsInternal

      @Nullable @InternalUseOnly static @Nullable SchemaInternal maybeAsInternal(@Nullable @Nullable Schema schema)
      Attempts to cast an optional Core+ Schema to a SchemaInternal. For internal use only. Throws SchemaException if the non-null schema cannot be cast to a SchemaInternal
      Parameters:
      schema - an optional Core+ Schema instance
      Returns:
      a SchemaInternal instance, or null if the input schema is null
    • getImmutable

      @NotNull default @NotNull Schema getImmutable()
      Get an immutable copy of this Schema. May return itself if it is already immutable.
      Returns:
      An immutable copy of this schema.
    • getImportSources

      @NotNull @NotNull List<ImportSource> getImportSources()
      Get all defined ImportSources.
      Returns:
      all defined import sources, might be empty
    • getImportSources

      @NotNull @NotNull List<ImportSource> getImportSources(@NotNull @NotNull String type)
      Get all ImportSources of the given type.
      Parameters:
      type - the import source type
      Returns:
      all import sources of the given type, may be null.
    • getImportSource

      @Nullable @Nullable ImportSource getImportSource(@NotNull @NotNull String type, @Nullable @Nullable String sourceName)
      Get the ImportSource with the given type and name. The first matching ImportSource is returned, where it is possible to have more than one. If sourceName is null, the first import source of the specified type will be returned.
      Parameters:
      type - the import source type
      sourceName - the import source name, may be null
      Returns:
      the identified import source, or null if not found
    • getAttributes

      @NotNull @NotNull Map<String,String> getAttributes()
      Get all top level attributes for this schema.
      Returns:
      a map containing all attributes set for this schema. Might be empty.
    • getAttributeValue

      @Nullable @Nullable String getAttributeValue(@NotNull @NotNull String attributeName)
      Get the value for the named attribute.
      Parameters:
      attributeName - the attribute to fetch
      Returns:
      the value for the attribute, or null if it is not set
    • getPartitionKeyFormula

      @Nullable @Nullable String getPartitionKeyFormula()
      Get the partitioning key formula for this schema.
      Returns:
      the partitioning key formula if set, else null
    • hasLoggers

      boolean hasLoggers()
      Returns true if this schema has any Loggers or LoggerListeners.
      Returns:
      true if this schema has any Loggers or LoggerListeners
    • hasListeners

      boolean hasListeners()
      Returns true if this schema has any Listeners or LoggerListeners.
      Returns:
      true if this schema has any Listeners or LoggerListeners
    • getLoggers

      @NotNull @NotNull List<Logger> getLoggers()
      Get an immutable list of the Logger instances for this schema. This includes LoggerListeners.
      Returns:
      an immutable list of Loggers
    • getV2Loggers

      @NotNull @NotNull List<V2Logger> getV2Loggers()
      Get an immutable list of the V2Logger instances for this schema.
      Returns:
      an immutable list of V2 loggers
    • getListeners

      @NotNull @NotNull List<Listener> getListeners()
      Get an immutable list of the Listener instances for this schema. This includes LoggerListeners.
      Returns:
      an immutable list of Listeners
    • getValidator

      @Nullable @Nullable Validator getValidator()
      Get an immutable Validator for this schema.
      Returns:
      a Validator if configured, else null
    • getDataIndexSets

      @NotNull @NotNull List<String[]> getDataIndexSets()
      Get the set of Data Indexes for this table. Each element in the list is a set of columns which produce a key for which the table has been indexed by.
      Returns:
      a list of Data Index sets
    • getExtendedStorage

      @Nullable @Nullable ExtendedStorage getExtendedStorage()
      Return the extended storage for this schema
      Returns:
      an ExtendedStorage if present, else null
    • getDefaultMergeFormat

      @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.databases.Database.StorageFormat getDefaultMergeFormat()
      Returns:
      the preferred merge storage format
    • getMergeCodecName

      @Nullable @Nullable String getMergeCodecName(@NotNull @NotNull String mergeFormat)
      For the specified merge format, return the defined codec name, if any.
      Parameters:
      mergeFormat - the merge format
      Returns:
      the codec name, if defined
    • getGroupingColumns

      @NotNull @NotNull List<String> getGroupingColumns()
      Returns:
      An immutable collection of columns defined within the schema as Grouping
    • getPartitioningColumns

      @NotNull @NotNull List<String> getPartitioningColumns()
      Returns:
      An immutable collection of columns defined within the schema as Partitioning
    • getSymbolTableTypes

      @NotNull @NotNull Map<String,io.deephaven.shadow.enterprise.com.illumon.dataobjects.ColumnDefinition.SymbolTableType> getSymbolTableTypes()
      Returns:
      an immutable map of columns with a defined SymbolTableType
    • getStorageType

      StorageType getStorageType()
      Get the StorageType as an integer enum value.
      Returns:
      the storage type
    • getTableType

      @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.TableType getTableType(boolean intraday)
      Get the table type for this schema, depending on if it was an intraday table or not. Note that the intraday setting is ignored for User table types. Note: This method's table type inference does not account for new table types; in particular, for User tables. To do so, use getTableTypeV2(boolean) instead. This method is not scheduled for removal, but should only be used within Legacy workers or infrastructure code.
      Parameters:
      intraday - true if the returned type should reflect an intraday table
      Returns:
      The table type
    • getTableTypeV2

      @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.TableType getTableTypeV2(boolean intraday)
      Get the table type for this schema, depending on if it was an intraday table or not. The intraday setting is used even for User table types.
      Parameters:
      intraday - true if the returned type should reflect an intraday table
      Returns:
      The table type
    • getLegacySchema

      @NotNull @InternalUseOnly io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema getLegacySchema()
      Provides direct access to the underlying Legacy Schema instance. For internal use only.
      Returns:
      the underlying Legacy Schema instance
    • getLegacyTableDefinition

      @NotNull @InternalUseOnly io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition getLegacyTableDefinition()
      Provides direct access to the underlying Legacy TableDefinition instance. For internal use only.
      Returns:
      the underlying Legacy TableDefinition instance