public class CachingPersistentStoreProvider extends BasePersistentStoreProvider
Constructor and Description |
---|
CachingPersistentStoreProvider(PersistentStoreProvider provider) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<V> PersistentStore<V> |
getOrCreateStore(PersistentStoreConfig<V> config)
Gets or creates a
persistent store for the given configuration. |
<V> VersionedPersistentStore<V> |
getOrCreateVersionedStore(PersistentStoreConfig<V> config)
Override this method if store supports versioning and return versioning instance.
|
void |
start()
Sets up the provider.
|
public CachingPersistentStoreProvider(PersistentStoreProvider provider)
public <V> PersistentStore<V> getOrCreateStore(PersistentStoreConfig<V> config) throws StoreException
PersistentStoreProvider
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 storepublic <V> VersionedPersistentStore<V> getOrCreateVersionedStore(PersistentStoreConfig<V> config) throws StoreException
PersistentStoreProvider
V
- store value typeconfig
- store configurationStoreException
- in case when unable to create storepublic void start() throws Exception
PersistentStoreProvider
start
in interface PersistentStoreProvider
start
in class BasePersistentStoreProvider
Exception
public void close() throws Exception
close
in interface AutoCloseable
close
in class BasePersistentStoreProvider
Exception
Copyright © 1970 The Apache Software Foundation. All rights reserved.