Class BKStateStoreProviderImpl

java.lang.Object
org.apache.pulsar.functions.instance.state.BKStateStoreProviderImpl
All Implemented Interfaces:
AutoCloseable, StateStoreProvider

public class BKStateStoreProviderImpl extends Object implements StateStoreProvider
The state store provider that provides bookkeeper table backed state stores.
  • Constructor Details

    • BKStateStoreProviderImpl

      public BKStateStoreProviderImpl()
  • Method Details

    • init

      public void init(Map<String,Object> config) throws 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.
      Throws:
      Exception - when failed to init the state store provider.
    • getStateStore

      public <T extends StateStore> T getStateStore(String tenant, String namespace, String name) throws Exception
      Description copied from interface: StateStoreProvider
      Get the state store with the provided store name.
      Specified by:
      getStateStore in interface StateStoreProvider
      Type Parameters:
      T - 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:
      ClassCastException - if the return type isn't a type or interface of the actual returned store.
      Exception
    • cleanUp

      public void cleanUp(String tenant, String namespace, String name) throws Exception
      Description copied from interface: StateStoreProvider
      Clean up the state store with the provided store name.
      Specified by:
      cleanUp in interface StateStoreProvider
      Parameters:
      tenant - the tenant that owns this state store
      namespace - the namespace that owns this state store
      name - the state store name
      Throws:
      Exception - when failed to clean up the state store provider.
    • close

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