public class InMemoryCatalogManager extends java.lang.Object implements CatalogManager
Constructor and Description |
---|
InMemoryCatalogManager() |
Modifier and Type | Method and Description |
---|---|
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.
|
Catalog |
currentCatalog()
Produces the currently active catalog.
|
void |
dropCatalog(java.lang.String name)
Drops the catalog with this name.
|
@Nullable Catalog |
getCatalog(java.lang.String name)
Attempts to fetch the catalog with this name.
|
void |
registerTableProvider(java.lang.String name,
TableProvider tableProvider)
Registers a
TableProvider and propagates it to all the Catalog instances
available to this manager. |
void |
useCatalog(java.lang.String name)
Switches the active catalog.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerTableProvider
public void createCatalog(java.lang.String name, java.lang.String type, java.util.Map<java.lang.String,java.lang.String> properties)
CatalogManager
createCatalog
in interface CatalogManager
public void useCatalog(java.lang.String name)
CatalogManager
useCatalog
in interface CatalogManager
public Catalog currentCatalog()
CatalogManager
currentCatalog
in interface CatalogManager
public @Nullable Catalog getCatalog(java.lang.String name)
CatalogManager
getCatalog
in interface CatalogManager
public void dropCatalog(java.lang.String name)
CatalogManager
dropCatalog
in interface CatalogManager
public void registerTableProvider(java.lang.String name, TableProvider tableProvider)
CatalogManager
TableProvider
and propagates it to all the Catalog
instances
available to this manager.registerTableProvider
in interface CatalogManager