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

invalid reference
#registerTableProvider(String, TableProvider)
is called, the provider should become available for all catalogs.
  • Method Details

    • createCatalog

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

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

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

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

      void dropCatalog(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.
    • tableProviders

      Map<String,TableProvider> tableProviders()
      Returns all the TableProviders available to this CatalogManager, organized by type.
    • catalogs

      Collection<Catalog> catalogs()