接口 StateStoreProvider
- 所有超级接口:
AutoCloseable
The State Store Provider provides the state stores for a function.
-
字段概要
字段修饰符和类型字段说明static final StateStoreProviderThe state store provider returns `null` state stores.static final String -
方法概要
修饰符和类型方法说明voidclose()<S extends org.apache.pulsar.functions.api.StateStore>
SgetStateStore(String tenant, String namespace, String name) Get the state store with the provided store name.default voidinit(Map<String, Object> config, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails) Initialize the state store provider.
-
字段详细资料
-
STATE_STORAGE_SERVICE_URL
- 另请参阅:
-
NULL
The state store provider returns `null` state stores.
-
-
方法详细资料
-
init
default void init(Map<String, Object> config, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails) throws ExceptionInitialize the state store provider.- 参数:
config- the config to init the state store provider.functionDetails- the function details.- 抛出:
Exception- when failed to init the state store provider.
-
getStateStore
<S extends org.apache.pulsar.functions.api.StateStore> S getStateStore(String tenant, String namespace, String name) throws Exception Get the state store with the provided store name.- 类型参数:
S- the type of interface of the store to return- 参数:
tenant- the tenant that owns this state storenamespace- the namespace that owns this state storename- the state store name- 返回:
- the state store instance.
- 抛出:
ClassCastException- if the return type isn't a type or interface of the actual returned store.Exception
-
close
void close()- 指定者:
close在接口中AutoCloseable
-