Class DeephavenSchema
java.lang.Object
io.deephaven.enterprise.schema.Schema.AbstractSchema
io.deephaven.enterprise.schema.impl.DeephavenSchema
- All Implemented Interfaces:
SchemaInternal,Schema
@InternalUseOnly
public final class DeephavenSchema
extends Schema.AbstractSchema
implements SchemaInternal
This implementation of
SchemaInternal delegates to a Legacy Schema instance-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.enterprise.schema.Schema
Schema.AbstractSchema, Schema.Delegating -
Method Summary
Modifier and TypeMethodDescriptionGet all top level attributes for this schema.@Nullable StringgetAttributeValue(@NotNull String attributeName) Get the value for the named attribute.Get an unmodifiable map of column names to column descriptions.Get the set of Data Indexes for this table.io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.databases.Database.StorageFormat@Nullable ExtendedStorageReturn the extended storage for this schema@Nullable ImportSourcegetImportSource(@NotNull String type, @Nullable String sourceName) Get theImportSourcewith the given type and name.@NotNull List<ImportSource>Get all definedImportSources.@NotNull List<ImportSource>getImportSources(@NotNull String type) Get allImportSources of the given type.Return the input table specification from this schema.io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaProvides direct access to the underlying Legacy Schema instance.io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinitionProvides direct access to the underlying Legacy TableDefinition instance.Get an immutable list of theListenerinstances for this schema.Get an immutable list of theLoggerinstances for this schema.@Nullable StringgetMergeCodecName(@NotNull String mergeFormat) For the specified merge format, return the defined codec name, if any.@NotNull StringGets the namespace of the table@NotNull NamespaceSetGets theNamespaceSetto which this schema belongs@Nullable StringGet the partitioning key formula for this schema.Get the StorageType as an integer enum value.@NotNull Map<String,io.deephaven.shadow.enterprise.com.illumon.dataobjects.ColumnDefinition.SymbolTableType> @NotNull TableDefinitionGets theTableDefinitioncorresponding to this Schema@NotNull StringGets the table description from the schema.@NotNull StringGets the name of the table@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.TableTypegetTableType(boolean intraday) Get the table type for this schema, depending on if it was an intraday table or not.@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.TableTypegetTableTypeV2(boolean intraday) Get the table type for this schema, depending on if it was an intraday table or not.Get an immutable list of theV2Loggerinstances for this schema.@Nullable ValidatorGet an immutableValidatorfor this schema.@NotNull SchemaVersionGets the version information of this schemabooleanReturns true if this schema has any Listeners or LoggerListeners.booleanReturns true if this schema has any Loggers or LoggerListeners.static DeephavenSchemaof(io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema legacySchema) Construct aDeephavenSchemainstance which delegates to a Legacy instanceMethods inherited from class io.deephaven.enterprise.schema.Schema.AbstractSchema
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.enterprise.schema.internal.SchemaInternal
getImmutable
-
Method Details
-
of
public static DeephavenSchema of(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema legacySchema) Construct aDeephavenSchemainstance which delegates to a Legacy instance- Parameters:
legacySchema- a Legacy Schema instance to which we will delegate most work- Returns:
- a new
DeephavenSchemainstance
-
getLegacySchema
@NotNull @InternalUseOnly public io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema getLegacySchema()Description copied from interface:SchemaInternalProvides direct access to the underlying Legacy Schema instance. For internal use only.- Specified by:
getLegacySchemain interfaceSchemaInternal- Returns:
- the underlying Legacy Schema instance
-
getNamespace
Description copied from interface:SchemaGets the namespace of the table- Specified by:
getNamespacein interfaceSchema- Returns:
- The namespace of the table
-
getTableName
Description copied from interface:SchemaGets the name of the table- Specified by:
getTableNamein interfaceSchema- Returns:
- The name of the table
-
getNamespaceSet
Description copied from interface:SchemaGets theNamespaceSetto which this schema belongs- Specified by:
getNamespaceSetin interfaceSchema- Returns:
- The
NamespaceSetto which this schema belongs
-
getLegacyTableDefinition
@NotNull @InternalUseOnly public io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition getLegacyTableDefinition()Description copied from interface:SchemaInternalProvides direct access to the underlying Legacy TableDefinition instance. For internal use only.- Specified by:
getLegacyTableDefinitionin interfaceSchemaInternal- Returns:
- the underlying Legacy TableDefinition instance
-
getTableDefinition
Description copied from interface:SchemaGets theTableDefinitioncorresponding to this Schema- Specified by:
getTableDefinitionin interfaceSchema- Returns:
- The
TableDefinitioncorresponding to this Schema
-
getVersion
Description copied from interface:SchemaGets the version information of this schema- Specified by:
getVersionin interfaceSchema- Returns:
- The version of this schema
-
getColumnDescriptions
Description copied from interface:SchemaGet an unmodifiable map of column names to column descriptions. Columns which do not have a description defined may not be represented in the map.- Specified by:
getColumnDescriptionsin interfaceSchema- Returns:
- A map of column names to column descriptions
-
getTableDescription
Description copied from interface:SchemaGets the table description from the schema.- Specified by:
getTableDescriptionin interfaceSchema- Returns:
- The table description from the schema.
-
getInputTableStateSpec
Description copied from interface:SchemaReturn the input table specification from this schema.- Specified by:
getInputTableStateSpecin interfaceSchema- Returns:
- The input table specification if present, or null.
-
getImportSources
Description copied from interface:SchemaInternalGet all definedImportSources.- Specified by:
getImportSourcesin interfaceSchemaInternal- Returns:
- all defined import sources, might be empty
-
getImportSources
Description copied from interface:SchemaInternalGet allImportSources of the given type.- Specified by:
getImportSourcesin interfaceSchemaInternal- Parameters:
type- the import source type- Returns:
- all import sources of the given type, may be null.
-
getImportSource
@Nullable public @Nullable ImportSource getImportSource(@NotNull @NotNull String type, @Nullable @Nullable String sourceName) Description copied from interface:SchemaInternalGet theImportSourcewith 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.- Specified by:
getImportSourcein interfaceSchemaInternal- Parameters:
type- the import source typesourceName- the import source name, may be null- Returns:
- the identified import source, or null if not found
-
getAttributes
Description copied from interface:SchemaInternalGet all top level attributes for this schema.- Specified by:
getAttributesin interfaceSchemaInternal- Returns:
- a map containing all attributes set for this schema. Might be empty.
-
getAttributeValue
Description copied from interface:SchemaInternalGet the value for the named attribute.- Specified by:
getAttributeValuein interfaceSchemaInternal- Parameters:
attributeName- the attribute to fetch- Returns:
- the value for the attribute, or null if it is not set
-
getPartitionKeyFormula
Description copied from interface:SchemaInternalGet the partitioning key formula for this schema.- Specified by:
getPartitionKeyFormulain interfaceSchemaInternal- Returns:
- the partitioning key formula if set, else null
-
hasLoggers
public boolean hasLoggers()Description copied from interface:SchemaInternalReturns true if this schema has any Loggers or LoggerListeners.- Specified by:
hasLoggersin interfaceSchemaInternal- Returns:
- true if this schema has any Loggers or LoggerListeners
-
hasListeners
public boolean hasListeners()Description copied from interface:SchemaInternalReturns true if this schema has any Listeners or LoggerListeners.- Specified by:
hasListenersin interfaceSchemaInternal- Returns:
- true if this schema has any Listeners or LoggerListeners
-
getLoggers
Description copied from interface:SchemaInternalGet an immutable list of theLoggerinstances for this schema. This includes LoggerListeners.- Specified by:
getLoggersin interfaceSchemaInternal- Returns:
- an immutable list of Loggers
-
getV2Loggers
Description copied from interface:SchemaInternalGet an immutable list of theV2Loggerinstances for this schema.- Specified by:
getV2Loggersin interfaceSchemaInternal- Returns:
- an immutable list of V2 loggers
-
getListeners
Description copied from interface:SchemaInternalGet an immutable list of theListenerinstances for this schema. This includes LoggerListeners.- Specified by:
getListenersin interfaceSchemaInternal- Returns:
- an immutable list of Listeners
-
getValidator
Description copied from interface:SchemaInternalGet an immutableValidatorfor this schema.- Specified by:
getValidatorin interfaceSchemaInternal- Returns:
- a Validator if configured, else null
-
getDataIndexSets
Description copied from interface:SchemaInternalGet 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.- Specified by:
getDataIndexSetsin interfaceSchemaInternal- Returns:
- a list of Data Index sets
-
getExtendedStorage
Description copied from interface:SchemaInternalReturn the extended storage for this schema- Specified by:
getExtendedStoragein interfaceSchemaInternal- Returns:
- an
ExtendedStorageif present, else null
-
getDefaultMergeFormat
@NotNull public io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.databases.Database.StorageFormat getDefaultMergeFormat()- Specified by:
getDefaultMergeFormatin interfaceSchemaInternal- Returns:
- the preferred merge storage format
-
getMergeCodecName
Description copied from interface:SchemaInternalFor the specified merge format, return the defined codec name, if any.- Specified by:
getMergeCodecNamein interfaceSchemaInternal- Parameters:
mergeFormat- the merge format- Returns:
- the codec name, if defined
-
getGroupingColumns
- Specified by:
getGroupingColumnsin interfaceSchemaInternal- Returns:
- An immutable collection of columns defined within the schema as Grouping
-
getPartitioningColumns
- Specified by:
getPartitioningColumnsin interfaceSchemaInternal- Returns:
- An immutable collection of columns defined within the schema as Partitioning
-
getSymbolTableTypes
@NotNull public @NotNull Map<String,io.deephaven.shadow.enterprise.com.illumon.dataobjects.ColumnDefinition.SymbolTableType> getSymbolTableTypes()- Specified by:
getSymbolTableTypesin interfaceSchemaInternal- Returns:
- an immutable map of columns with a defined SymbolTableType
-
getStorageType
Description copied from interface:SchemaInternalGet the StorageType as an integer enum value.- Specified by:
getStorageTypein interfaceSchemaInternal- Returns:
- the storage type
-
getTableType
@NotNull public @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.TableType getTableType(boolean intraday) Description copied from interface:SchemaInternalGet 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 newtable types; in particular, for User tables. To do so, useSchemaInternal.getTableTypeV2(boolean)instead. This method is not scheduled for removal, but should only be used within Legacy workers or infrastructure code.- Specified by:
getTableTypein interfaceSchemaInternal- Parameters:
intraday- true if the returned type should reflect an intraday table- Returns:
- The table type
-
getTableTypeV2
@NotNull public @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.TableType getTableTypeV2(boolean intraday) Description copied from interface:SchemaInternalGet 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.- Specified by:
getTableTypeV2in interfaceSchemaInternal- Parameters:
intraday- true if the returned type should reflect an intraday table- Returns:
- The table type
-