Interface PersistentStoreProvider

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
BasePersistentStoreProvider, CachingPersistentStoreProvider, HBasePersistentStoreProvider, HBasePStoreProvider, InMemoryStoreProvider, LocalPersistentStoreProvider, MongoPersistentStoreProvider, ZkPStoreProvider, ZookeeperPersistentStoreProvider

public interface PersistentStoreProvider extends AutoCloseable
A factory used to create store instances.
  • Method Details

    • getOrCreateStore

      <V> PersistentStore<V> getOrCreateStore(PersistentStoreConfig<V> config) throws StoreException
      Gets or creates a persistent store for the given configuration. Note that implementors have liberty to cache previous store instances.
      Type Parameters:
      V - store value type
      Parameters:
      config - store configuration
      Returns:
      persistent store instance
      Throws:
      StoreException - in case when unable to create store
    • getOrCreateVersionedStore

      default <V> VersionedPersistentStore<V> getOrCreateVersionedStore(PersistentStoreConfig<V> config) throws StoreException
      Override this method if store supports versioning and return versioning instance. By default, undefined version wrapper will be used.
      Type Parameters:
      V - store value type
      Parameters:
      config - store configuration
      Returns:
      versioned persistent store instance
      Throws:
      StoreException - in case when unable to create store
    • start

      void start() throws Exception
      Sets up the provider.
      Throws:
      Exception