public class InMemoryStoreProvider extends Object implements PersistentStoreProvider
Constructor and Description |
---|
InMemoryStoreProvider(int capacity) |
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 void close() throws Exception
close
in interface AutoCloseable
Exception
public <V> PersistentStore<V> getOrCreateStore(PersistentStoreConfig<V> config)
PersistentStoreProvider
persistent store
for the given configuration.
Note that implementors have liberty to cache previous store
instances.getOrCreateStore
in interface PersistentStoreProvider
V
- store value typeconfig
- store configurationpublic <V> VersionedPersistentStore<V> getOrCreateVersionedStore(PersistentStoreConfig<V> config)
PersistentStoreProvider
getOrCreateVersionedStore
in interface PersistentStoreProvider
V
- store value typeconfig
- store configurationpublic void start()
PersistentStoreProvider
start
in interface PersistentStoreProvider
Copyright © 1970 The Apache Software Foundation. All rights reserved.