Interface SchemaInternal
- All Superinterfaces:
Schema
- All Known Implementing Classes:
DeephavenSchema
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.enterprise.schema.Schema
Schema.AbstractSchema, Schema.Delegating -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SchemaInternalasInternal(@Nullable Schema schema) Attempts to cast a non-null Core+Schemato aSchemaInternal.Get all top level attributes for this schema.@Nullable StringgetAttributeValue(@NotNull String attributeName) Get the value for the named attribute.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 schemadefault @NotNull SchemaGet an immutable copy of thisSchema.@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.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.@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 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.booleanReturns true if this schema has any Listeners or LoggerListeners.booleanReturns true if this schema has any Loggers or LoggerListeners.static @Nullable SchemaInternalmaybeAsInternal(@Nullable Schema schema) Attempts to cast an optional Core+Schemato aSchemaInternal.static SchemaInternalof(io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema legacySchema) Construct aSchemaInternalinstance which delegates to a Legacy instanceMethods inherited from interface io.deephaven.enterprise.schema.Schema
getColumnDescriptions, getInputTableStateSpec, getNamespace, getNamespaceSet, getTableDefinition, getTableDescription, getTableName, getVersion
-
Method Details
-
of
static SchemaInternal of(@NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema legacySchema) Construct aSchemaInternalinstance which delegates to a Legacy instance- Parameters:
legacySchema- a Legacy Schema instance to which we will delegate most work- Returns:
- a new
SchemaInternalinstance
-
asInternal
@NotNull @InternalUseOnly static @NotNull SchemaInternal asInternal(@Nullable @Nullable Schema schema) Attempts to cast a non-null Core+Schemato aSchemaInternal. For internal use only. ThrowsSchemaExceptionif the schema cannot be cast to aSchemaInternal- Parameters:
schema- a non-null Core+Schemainstance- Returns:
- a
SchemaInternalinstance, if possible
-
maybeAsInternal
@Nullable @InternalUseOnly static @Nullable SchemaInternal maybeAsInternal(@Nullable @Nullable Schema schema) Attempts to cast an optional Core+Schemato aSchemaInternal. For internal use only. ThrowsSchemaExceptionif the non-null schema cannot be cast to aSchemaInternal- Parameters:
schema- an optional Core+Schemainstance- Returns:
- a
SchemaInternalinstance, or null if the input schema is null
-
getImmutable
Get an immutable copy of thisSchema. May return itself if it is already immutable.- Returns:
- An immutable copy of this schema.
-
getImportSources
Get all definedImportSources.- Returns:
- all defined import sources, might be empty
-
getImportSources
Get allImportSources 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 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.- Parameters:
type- the import source typesourceName- the import source name, may be null- Returns:
- the identified import source, or null if not found
-
getAttributes
Get all top level attributes for this schema.- Returns:
- a map containing all attributes set for this schema. Might be empty.
-
getAttributeValue
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
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
Get an immutable list of theLoggerinstances for this schema. This includes LoggerListeners.- Returns:
- an immutable list of Loggers
-
getV2Loggers
Get an immutable list of theV2Loggerinstances for this schema.- Returns:
- an immutable list of V2 loggers
-
getListeners
Get an immutable list of theListenerinstances for this schema. This includes LoggerListeners.- Returns:
- an immutable list of Listeners
-
getValidator
Get an immutableValidatorfor this schema.- Returns:
- a Validator if configured, else null
-
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
Return the extended storage for this schema- Returns:
- an
ExtendedStorageif 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
For the specified merge format, return the defined codec name, if any.- Parameters:
mergeFormat- the merge format- Returns:
- the codec name, if defined
-
getGroupingColumns
- Returns:
- An immutable collection of columns defined within the schema as Grouping
-
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 newtable types; in particular, for User tables. To do so, usegetTableTypeV2(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
-