接口 StateStoreProvider

所有超级接口:
AutoCloseable
所有已知实现类:
BKStateStoreProviderImpl, PulsarMetadataStateStoreProviderImpl

public interface StateStoreProvider extends AutoCloseable
The State Store Provider provides the state stores for a function.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final StateStoreProvider
    The state store provider returns `null` state stores.
    static final String
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
     
    <S extends org.apache.pulsar.functions.api.StateStore>
    S
    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.
  • 字段详细资料

    • STATE_STORAGE_SERVICE_URL

      static final String STATE_STORAGE_SERVICE_URL
      另请参阅:
    • NULL

      static final StateStoreProvider 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 Exception
      Initialize 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 store
      namespace - the namespace that owns this state store
      name - 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