Interface CatalogManager

  • All Known Implementing Classes:
    EmptyCatalogManager, InMemoryCatalogManager

    @Internal
    public interface CatalogManager
    Top-level authority that manages Catalogs. Used inside the root BeamCalciteSchema.

    Implementations should have a way of determining which catalog is currently active, and produce it when currentCatalog() is invoked.

    When #registerTableProvider(String, TableProvider) is called, the provider should become available for all catalogs.

    • Method Detail

      • createCatalog

        void createCatalog​(java.lang.String name,
                           java.lang.String type,
                           java.util.Map<java.lang.String,​java.lang.String> properties)
        Creates and stores a catalog of a particular type.
      • useCatalog

        void useCatalog​(java.lang.String name)
        Switches the active catalog.
      • currentCatalog

        Catalog currentCatalog()
        Produces the currently active catalog.
      • getCatalog

        @Nullable Catalog getCatalog​(java.lang.String name)
        Attempts to fetch the catalog with this name. May produce null if it does not exist.
      • dropCatalog

        void dropCatalog​(java.lang.String name)
        Drops the catalog with this name. No-op if the catalog already does not exist.
      • registerTableProvider

        void registerTableProvider​(TableProvider tableProvider)
        Registers a TableProvider and propagates it to all the Catalog instances available to this manager.
      • catalogs

        java.util.Collection<Catalog> catalogs()