Interface StructureHandler
- All Known Implementing Classes:
MapStructureHandler,SequenceStructureHandler
public interface StructureHandler
Handler to snapshot and restore structures (maps, sequences).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classContains registered structure handlers. -
Method Summary
Modifier and TypeMethodDescriptioncreateStructureDescriptors(org.apache.ignite.internal.catalog.Catalog catalog, Set<Integer> structureIds) Creates descriptors for the given structure IDs.dependenciesForTables(org.apache.ignite.internal.catalog.Catalog catalog, Collection<org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor> tables) Retrieves structures required for the given tables.@Nullable StructuregetStructure(org.apache.ignite.internal.catalog.Catalog catalog, org.apache.ignite.internal.catalog.descriptors.CatalogSchemaDescriptor schema, String structureName) Retrieves structure by name from the given schema.static Set<StructureHandler>Returns registered structure handlers.getStructures(org.apache.ignite.internal.catalog.Catalog catalog) Retrieves all structures from the given catalog.static voidrenameSystemTable(CommandState commandState, StructureView view, String newName) Adds command to the command state to rename system table associated with the given structure view.booleantryDropStructure(org.apache.ignite.internal.catalog.UpdateContext updateContext, CommandState commandState, StructureView view) If given view matches the handler, adds commands to command state to drop corresponding structure and returnstrue.booleantryRestoreStructure(org.apache.ignite.internal.catalog.UpdateContext updateContext, CommandState commandState, StructureView view, int schemaId, int tableId, AtomicInteger nextGeneratedStructureId) If given view matches the handler, adds commands to command state to restore the given structure and returnstrue.
-
Method Details
-
getStructures
Retrieves all structures from the given catalog. -
dependenciesForTables
Set<Structure> dependenciesForTables(org.apache.ignite.internal.catalog.Catalog catalog, Collection<org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor> tables) Retrieves structures required for the given tables. -
getStructure
@Nullable @Nullable Structure getStructure(org.apache.ignite.internal.catalog.Catalog catalog, org.apache.ignite.internal.catalog.descriptors.CatalogSchemaDescriptor schema, String structureName) Retrieves structure by name from the given schema. -
tryRestoreStructure
boolean tryRestoreStructure(org.apache.ignite.internal.catalog.UpdateContext updateContext, CommandState commandState, StructureView view, int schemaId, int tableId, AtomicInteger nextGeneratedStructureId) If given view matches the handler, adds commands to command state to restore the given structure and returnstrue. -
tryDropStructure
boolean tryDropStructure(org.apache.ignite.internal.catalog.UpdateContext updateContext, CommandState commandState, StructureView view) If given view matches the handler, adds commands to command state to drop corresponding structure and returnstrue. -
createStructureDescriptors
Set<StructureView> createStructureDescriptors(org.apache.ignite.internal.catalog.Catalog catalog, Set<Integer> structureIds) Creates descriptors for the given structure IDs. -
renameSystemTable
Adds command to the command state to rename system table associated with the given structure view. -
getStructureHandlers
Returns registered structure handlers.
-