Class CachingPersistentStoreProvider
java.lang.Object
org.apache.drill.exec.store.sys.store.provider.BasePersistentStoreProvider
org.apache.drill.exec.store.sys.store.provider.CachingPersistentStoreProvider
- All Implemented Interfaces:
AutoCloseable
,PersistentStoreProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
<V> PersistentStore<V>
getOrCreateStore
(PersistentStoreConfig<V> config) Gets or creates apersistent 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.
-
Constructor Details
-
CachingPersistentStoreProvider
-
-
Method Details
-
getOrCreateStore
public <V> PersistentStore<V> getOrCreateStore(PersistentStoreConfig<V> config) throws StoreException Description copied from interface:PersistentStoreProvider
Gets or creates apersistent store
for the given configuration. Note that implementors have liberty to cache previousstore
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
public <V> VersionedPersistentStore<V> getOrCreateVersionedStore(PersistentStoreConfig<V> config) throws StoreException Description copied from interface:PersistentStoreProvider
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
Description copied from interface:PersistentStoreProvider
Sets up the provider.- Specified by:
start
in interfacePersistentStoreProvider
- Overrides:
start
in classBasePersistentStoreProvider
- Throws:
Exception
-
close
- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classBasePersistentStoreProvider
- Throws:
Exception
-