public interface StateStoreProvider extends AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static StateStoreProvider |
NULL
The state store provider returns `null` state stores.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
<S extends StateStore> |
getStateStore(String tenant,
String namespace,
String name)
Get the state store with the provided store name.
|
default void |
init(Map<String,Object> config,
org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
Initialize the state store provider.
|
static final StateStoreProvider NULL
default void init(Map<String,Object> config, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails) throws Exception
config - the config to init the state store provider.functionDetails - the function details.Exception - when failed to init the state store provider.<S extends StateStore> S getStateStore(String tenant, String namespace, String name) throws Exception
S - the type of interface of the store to returntenant - the tenant that owns this state storenamespace - the namespace that owns this state storename - the state store nameClassCastException - if the return type isn't a type
or interface of the actual returned store.Exceptionvoid close()
close in interface AutoCloseableCopyright © 2017–2021 Apache Software Foundation. All rights reserved.