public interface PersistentStoreProvider extends AutoCloseable
store
instances.Modifier and Type | Method and Description |
---|---|
<V> PersistentStore<V> |
getOrCreateStore(PersistentStoreConfig<V> config)
Gets or creates a
persistent store for the given configuration. |
default <V> VersionedPersistentStore<V> |
getOrCreateVersionedStore(PersistentStoreConfig<V> config)
Override this method if store supports versioning and return versioning instance.
|
void |
start()
Sets up the provider.
|
close
<V> PersistentStore<V> getOrCreateStore(PersistentStoreConfig<V> config) throws StoreException
persistent store
for the given configuration.
Note that implementors have liberty to cache previous store
instances.V
- store value typeconfig
- store configurationStoreException
- in case when unable to create storedefault <V> VersionedPersistentStore<V> getOrCreateVersionedStore(PersistentStoreConfig<V> config) throws StoreException
V
- store value typeconfig
- store configurationStoreException
- in case when unable to create storeCopyright © 1970 The Apache Software Foundation. All rights reserved.