Package org.apache.flink.table.catalog
Class CatalogStoreHolder
java.lang.Object
org.apache.flink.table.catalog.CatalogStoreHolder
- All Implemented Interfaces:
AutoCloseable
A holder for a
CatalogStore instance and the necessary information for creating and
initializing Catalog instances, including a CatalogStoreFactory, a ReadableConfig instance, and a ClassLoader instance. This class provides automatic
resource management using the AutoCloseable interface, ensuring that the catalog-related
resources are properly closed and released when they are no longer needed.
A CatalogStoreFactory may create multiple CatalogStore instances, which can be
useful in SQL gateway scenarios where different sessions may use different catalog stores.
However, in some scenarios, a single CatalogStore instance may be sufficient, in which
case the CatalogStoreFactory can be stored in the holder to ensure that it is properly
closed when the CatalogStore is closed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for a fluent definition of aCatalogStoreHolder. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.apache.flink.configuration.ReadableConfigconfig()static CatalogStoreHolder.Buildervoidopen()
-
Method Details
-
newBuilder
-
catalogStore
-
config
public org.apache.flink.configuration.ReadableConfig config() -
classLoader
-
open
public void open() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-