Class InMemoryStoreProvider
java.lang.Object
org.apache.drill.exec.store.sys.store.provider.InMemoryStoreProvider
- All Implemented Interfaces:
AutoCloseable
,PersistentStoreProvider
-
Constructor Summary
-
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
-
InMemoryStoreProvider
public InMemoryStoreProvider(int capacity)
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getOrCreateStore
Description copied from interface:PersistentStoreProvider
Gets or creates apersistent store
for the given configuration. Note that implementors have liberty to cache previousstore
instances.- Specified by:
getOrCreateStore
in interfacePersistentStoreProvider
- Type Parameters:
V
- store value type- Parameters:
config
- store configuration- Returns:
- persistent store instance
-
getOrCreateVersionedStore
Description copied from interface:PersistentStoreProvider
Override this method if store supports versioning and return versioning instance. By default, undefined version wrapper will be used.- Specified by:
getOrCreateVersionedStore
in interfacePersistentStoreProvider
- Type Parameters:
V
- store value type- Parameters:
config
- store configuration- Returns:
- versioned persistent store instance
-
start
public void start()Description copied from interface:PersistentStoreProvider
Sets up the provider.- Specified by:
start
in interfacePersistentStoreProvider
-