Interface StructureHandler

All Known Implementing Classes:
MapStructureHandler, SequenceStructureHandler

public interface StructureHandler
Handler to snapshot and restore structures (maps, sequences).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Contains registered structure handlers.
  • Method Summary

    Modifier and Type
    Method
    Description
    createStructureDescriptors(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 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.
    Returns registered structure handlers.
    getStructures(org.apache.ignite.internal.catalog.Catalog catalog)
    Retrieves all structures from the given catalog.
    static void
    renameSystemTable(CommandState commandState, StructureView view, String newName)
    Adds command to the command state to rename system table associated with the given structure view.
    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 returns true.
    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 returns true.
  • Method Details

    • getStructures

      Set<Structure> getStructures(org.apache.ignite.internal.catalog.Catalog catalog)
      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 returns true.
    • 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 returns true.
    • createStructureDescriptors

      Set<StructureView> createStructureDescriptors(org.apache.ignite.internal.catalog.Catalog catalog, Set<Integer> structureIds)
      Creates descriptors for the given structure IDs.
    • renameSystemTable

      static void renameSystemTable(CommandState commandState, StructureView view, String newName)
      Adds command to the command state to rename system table associated with the given structure view.
    • getStructureHandlers

      static Set<StructureHandler> getStructureHandlers()
      Returns registered structure handlers.