Interface CatalogManager
-
- All Known Implementing Classes:
EmptyCatalogManager,InMemoryCatalogManager
@Internal public interface CatalogManagerTop-level authority that managesCatalogs. Used inside the rootBeamCalciteSchema.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<Catalog>catalogs()voidcreateCatalog(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.CatalogcurrentCatalog()Produces the currently active catalog.voiddropCatalog(java.lang.String name)Drops the catalog with this name.@Nullable CataloggetCatalog(java.lang.String name)Attempts to fetch the catalog with this name.voidregisterTableProvider(TableProvider tableProvider)Registers aTableProviderand propagates it to all theCataloginstances available to this manager.java.util.Map<java.lang.String,TableProvider>tableProviders()Returns all theTableProviders available to thisCatalogManager, organized by type.voiduseCatalog(java.lang.String name)Switches the active catalog.
-
-
-
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 aTableProviderand propagates it to all theCataloginstances available to this manager.
-
tableProviders
java.util.Map<java.lang.String,TableProvider> tableProviders()
Returns all theTableProviders available to thisCatalogManager, organized by type.
-
catalogs
java.util.Collection<Catalog> catalogs()
-
-