Class InMemoryStoreProvider
java.lang.Object
org.apache.drill.exec.store.sys.store.provider.InMemoryStoreProvider
- All Implemented Interfaces:
AutoCloseable,PersistentStoreProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<V> PersistentStore<V> getOrCreateStore(PersistentStoreConfig<V> config) Gets or creates apersistent storefor the given configuration.<V> VersionedPersistentStore<V> getOrCreateVersionedStore(PersistentStoreConfig<V> config) Override this method if store supports versioning and return versioning instance.voidstart()Sets up the provider.
-
Constructor Details
-
InMemoryStoreProvider
public InMemoryStoreProvider(int capacity)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getOrCreateStore
Description copied from interface:PersistentStoreProviderGets or creates apersistent storefor the given configuration. Note that implementors have liberty to cache previousstoreinstances.- Specified by:
getOrCreateStorein interfacePersistentStoreProvider- Type Parameters:
V- store value type- Parameters:
config- store configuration- Returns:
- persistent store instance
-
getOrCreateVersionedStore
Description copied from interface:PersistentStoreProviderOverride this method if store supports versioning and return versioning instance. By default, undefined version wrapper will be used.- Specified by:
getOrCreateVersionedStorein interfacePersistentStoreProvider- Type Parameters:
V- store value type- Parameters:
config- store configuration- Returns:
- versioned persistent store instance
-
start
public void start()Description copied from interface:PersistentStoreProviderSets up the provider.- Specified by:
startin interfacePersistentStoreProvider
-