Class PulsarMetadataStateStoreProviderImpl
java.lang.Object
org.apache.pulsar.functions.instance.state.PulsarMetadataStateStoreProviderImpl
- All Implemented Interfaces:
AutoCloseable,StateStoreProvider
-
Field Summary
Fields inherited from interface org.apache.pulsar.functions.instance.state.StateStoreProvider
NULL, STATE_STORAGE_SERVICE_URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getStateStore(String tenant, String namespace, String name) Get the state store with the provided store name.voidinit(Map<String, Object> config, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails) Initialize the state store provider.
-
Constructor Details
-
PulsarMetadataStateStoreProviderImpl
public PulsarMetadataStateStoreProviderImpl()
-
-
Method Details
-
init
public void init(Map<String, Object> config, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails) throws ExceptionDescription copied from interface:StateStoreProviderInitialize the state store provider.- Specified by:
initin interfaceStateStoreProvider- Parameters:
config- the config to init the state store provider.functionDetails- the function details.- Throws:
Exception- when failed to init the state store provider.
-
getStateStore
public DefaultStateStore getStateStore(String tenant, String namespace, String name) throws Exception Description copied from interface:StateStoreProviderGet the state store with the provided store name.- Specified by:
getStateStorein interfaceStateStoreProvider- Parameters:
tenant- the tenant that owns this state storenamespace- the namespace that owns this state storename- the state store name- Returns:
- the state store instance.
- Throws:
ClassCastException- if the return type isn't a type or interface of the actual returned store.Exception
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStateStoreProvider
-