Package com.illumon.iris.db.schema
Class InvalidSchema
java.lang.Object
com.illumon.iris.db.schema.InvalidSchema
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
,Schema
,TableDefinitionSchema
,SchemaXml
,Serializable
public class InvalidSchema extends Object implements SchemaXml
Placeholder schema for copy tables that delegate to nonexistent/invalid sources.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.schema.Schema
Schema.AbstractSchema, Schema.Delegating
-
Constructor Summary
Constructors Constructor Description InvalidSchema(String namespace, String tableName, String message)
-
Method Summary
Modifier and Type Method Description Map<String,String>
getAttributes()
Get all top level attributes for this schema.String
getAttributeValue(String attributeName)
Get the value for the named attribute.Map<String,String>
getColumnDescriptions()
Get an unmodifiable map of column names to column descriptions.List<String[]>
getDataIndexSets()
Get the set of Data Indexes for this table.Database.StorageFormat
getDefaultMergeFormat()
org.jdom2.Element
getElement()
SchemaXml
getImmutable()
Get an immutable copy of thisSchema
.ImportSource
getImportSource(String type, String sourceName)
Get theImportSource
with the given type and name.org.jdom2.Element
getImportSourceElement(String type, String sourceName)
Schema.getImportSource(String, String)
, as an XML Element.List<ImportSource>
getImportSources()
Get all definedImportSource
s.List<ImportSource>
getImportSources(String type)
Get allImportSource
s of the given type.List<org.jdom2.Element>
getListenerElements()
Schema.getListeners()
, with Listeners as XML Elements.List<Listener>
getListeners()
Get an immutable list of the Listeners for this schema.List<org.jdom2.Element>
getLoggerElements()
Schema.getLoggers()
, with Loggers as XML Elements.List<Logger>
getLoggers()
Get an immutable list of the Loggers for this schema.String
getMergeCodecName(String mergeFormat)
For the specified merge format, return the defined codec name, if any.MutableSchema
getMutable()
Get a mutable copy of thisSchema
.String
getNamespace()
NamespaceSet
getNamespaceSet()
String
getPartitionKeyFormula()
Get the partitioning key formula for this schema.TableDefinition
getTableDefinition()
String
getTableDescription()
String
getTableName()
TableType
getTableType(boolean intraday)
Get the table type for this schema, depending on if it was an intraday table or not.Validator
getValidator()
Get an immutable Validator for this schema.SchemaVersion
getVersion()
boolean
hasListeners()
Returns true if this schema has any Listeners or LoggerListeners.boolean
hasLoggers()
Returns true if this schema has any Loggers or LoggerListeners.String
toString()
-
Constructor Details
-
Method Details
-
getMutable
Description copied from interface:Schema
Get a mutable copy of thisSchema
. The returned copy is guaranteed to be decoupled from this instance, That is, changes to the returnedmutable
instance will not affect this instance.- Specified by:
getMutable
in interfaceSchema
- Returns:
- A mutable copy of this
Schema
.
-
getImmutable
Description copied from interface:Schema
Get an immutable copy of thisSchema
. May return itself if it is already immutable.- Specified by:
getImmutable
in interfaceSchema
- Specified by:
getImmutable
in interfaceSchemaXml
- Returns:
- An immutable copy of this schema.
-
getImportSources
Description copied from interface:Schema
Get all definedImportSource
s.- Specified by:
getImportSources
in interfaceSchema
- Returns:
- all defined import sources, might be empty
-
getImportSources
Description copied from interface:Schema
Get allImportSource
s of the given type.- Specified by:
getImportSources
in interfaceSchema
- Parameters:
type
- the import source type- Returns:
- all import sources of the given type, may be null.
-
getImportSource
Description copied from interface:Schema
Get theImportSource
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.- Specified by:
getImportSource
in interfaceSchema
- 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:Schema
Get all top level attributes for this schema.- Specified by:
getAttributes
in interfaceSchema
- Returns:
- a map containing all attributes set for this schema. Might be empty.
-
getAttributeValue
Description copied from interface:Schema
Get the value for the named attribute.- Specified by:
getAttributeValue
in interfaceSchema
- Parameters:
attributeName
- the attribute to fetch- Returns:
- the value for the attribute, or null if it is not set
-
getPartitionKeyFormula
Description copied from interface:Schema
Get the partitioning key formula for this schema.- Specified by:
getPartitionKeyFormula
in interfaceSchema
- Returns:
- the partitioning key formula if set, else null
-
hasLoggers
public boolean hasLoggers()Description copied from interface:Schema
Returns true if this schema has any Loggers or LoggerListeners.- Specified by:
hasLoggers
in interfaceSchema
- Returns:
- true if this schema has any Loggers or LoggerListeners
-
hasListeners
public boolean hasListeners()Description copied from interface:Schema
Returns true if this schema has any Listeners or LoggerListeners.- Specified by:
hasListeners
in interfaceSchema
- Returns:
- true if this schema has any Listeners or LoggerListeners
-
getLoggers
Description copied from interface:Schema
Get an immutable list of the Loggers for this schema. This includes LoggerListeners.- Specified by:
getLoggers
in interfaceSchema
- Returns:
- an immutable list of Loggers
-
getListeners
Description copied from interface:Schema
Get an immutable list of the Listeners for this schema. This includes LoggerListeners.- Specified by:
getListeners
in interfaceSchema
- Returns:
- an immutable list of Listeners
-
getValidator
Description copied from interface:Schema
Get an immutable Validator for this schema.- Specified by:
getValidator
in interfaceSchema
- Returns:
- a Validators if configured, or null
-
getNamespace
- Specified by:
getNamespace
in interfaceTableDefinitionSchema
- Returns:
- The namespace of the table
-
getTableName
- Specified by:
getTableName
in interfaceTableDefinitionSchema
- Returns:
- The name of the table
-
getDefaultMergeFormat
- Specified by:
getDefaultMergeFormat
in interfaceTableDefinitionSchema
- Returns:
- the preferred merge storage format
-
getMergeCodecName
Description copied from interface:TableDefinitionSchema
For the specified merge format, return the defined codec name, if any.- Specified by:
getMergeCodecName
in interfaceTableDefinitionSchema
- Parameters:
mergeFormat
- the merge format- Returns:
- the codec name, if defined
-
getNamespaceSet
- Specified by:
getNamespaceSet
in interfaceTableDefinitionSchema
- Returns:
- The
NamespaceSet
to which this schema belongs
-
getTableType
Description copied from interface:TableDefinitionSchema
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.- Specified by:
getTableType
in interfaceTableDefinitionSchema
- Parameters:
intraday
- true if the returned type should reflect an intraday table- Returns:
- The table type
-
getVersion
- Specified by:
getVersion
in interfaceTableDefinitionSchema
- Returns:
- The version of this schema
-
getTableDefinition
- Specified by:
getTableDefinition
in interfaceTableDefinitionSchema
- Returns:
- The
TableDefinition
corresponding to this Schema
-
getTableDescription
- Specified by:
getTableDescription
in interfaceTableDefinitionSchema
- Returns:
- The table description from the schema.
-
getColumnDescriptions
Description copied from interface:TableDefinitionSchema
Get an unmodifiable map of column names to column descriptions. The map may not contain any columns that don't have descriptions.- Specified by:
getColumnDescriptions
in interfaceTableDefinitionSchema
- Returns:
- A map of column names to column descriptions
-
getElement
@NotNull public org.jdom2.Element getElement()- Specified by:
getElement
in interfaceSchemaXml
- Returns:
- The underlying XML element describing this schema.
-
getImportSourceElement
@Nullable public org.jdom2.Element getImportSourceElement(@NotNull String type, @Nullable String sourceName)Description copied from interface:SchemaXml
Schema.getImportSource(String, String)
, as an XML Element.- Specified by:
getImportSourceElement
in interfaceSchemaXml
- Parameters:
type
- the import source typesourceName
- the import source name, may be null- Returns:
- the identified import source, or null if not found
-
getLoggerElements
Description copied from interface:SchemaXml
Schema.getLoggers()
, with Loggers as XML Elements.- Specified by:
getLoggerElements
in interfaceSchemaXml
- Returns:
- an immutable list of Loggers
-
getListenerElements
Description copied from interface:SchemaXml
Schema.getListeners()
, with Listeners as XML Elements.- Specified by:
getListenerElements
in interfaceSchemaXml
- Returns:
- an immutable list of Listeners
-
getDataIndexSets
Description copied from interface:Schema
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.- Specified by:
getDataIndexSets
in interfaceSchema
- Returns:
- a list of Data Index sets
-
toString
-