Class BKStateStoreProviderImpl

  • All Implemented Interfaces:
    java.lang.AutoCloseable, StateStoreProvider

    public class BKStateStoreProviderImpl
    extends java.lang.Object
    implements StateStoreProvider
    The state store provider that provides bookkeeper table backed state stores.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      <S extends org.apache.pulsar.functions.api.StateStore>
      S
      getStateStore​(java.lang.String tenant, java.lang.String namespace, java.lang.String name)
      Get the state store with the provided store name.
      void init​(java.util.Map<java.lang.String,​java.lang.Object> config, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
      Initialize the state store provider.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BKStateStoreProviderImpl

        public BKStateStoreProviderImpl()
    • Method Detail

      • init

        public void init​(java.util.Map<java.lang.String,​java.lang.Object> config,
                         org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
                  throws java.lang.Exception
        Description copied from interface: StateStoreProvider
        Initialize the state store provider.
        Specified by:
        init in interface StateStoreProvider
        Parameters:
        config - the config to init the state store provider.
        functionDetails - the function details.
        Throws:
        java.lang.Exception - when failed to init the state store provider.
      • getStateStore

        public <S extends org.apache.pulsar.functions.api.StateStore> S getStateStore​(java.lang.String tenant,
                                                                                      java.lang.String namespace,
                                                                                      java.lang.String name)
                                                                               throws java.lang.Exception
        Description copied from interface: StateStoreProvider
        Get the state store with the provided store name.
        Specified by:
        getStateStore in interface StateStoreProvider
        Type Parameters:
        S - the type of interface of the store to return
        Parameters:
        tenant - the tenant that owns this state store
        namespace - the namespace that owns this state store
        name - the state store name
        Returns:
        the state store instance.
        Throws:
        java.lang.ClassCastException - if the return type isn't a type or interface of the actual returned store.
        java.lang.Exception
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface StateStoreProvider