Class UndefinedVersionDelegatingStore<V>
java.lang.Object
org.apache.drill.exec.store.sys.store.UndefinedVersionDelegatingStore<V>
- Type Parameters:
V- store value type
- All Implemented Interfaces:
AutoCloseable,Store<V>,VersionedPersistentStore<V>
public class UndefinedVersionDelegatingStore<V>
extends Object
implements VersionedPersistentStore<V>
Wrapper store that delegates operations to PersistentStore.
Does not keep versioning and returns
DataChangeVersion.UNDEFINED when version is required.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleancontains(String key, DataChangeVersion version) Checks if lookup key is present in store.voidRemoves the value corresponding to the given key if exists, nothing happens otherwise.get(String key, DataChangeVersion version) Returns the value for the given key if exists, null otherwise.getMode()Returns storagemodeof this store.getRange(int skip, int take) Returns an iterator of desired number of entries offsetting by the skip value.voidput(String key, V value, DataChangeVersion version) Stores the (key, value) tuple in the store.booleanputIfAbsent(String key, V value) Stores the (key, value) tuple in the store only if it does not exists.
-
Constructor Details
-
UndefinedVersionDelegatingStore
-
-
Method Details
-
contains
Description copied from interface:VersionedPersistentStoreChecks if lookup key is present in store. Sets data change version number.- Specified by:
containsin interfaceVersionedPersistentStore<V>- Parameters:
key- lookup keyversion- version holder- Returns:
- true if store contains lookup key, false otherwise
-
get
Description copied from interface:VersionedPersistentStoreReturns the value for the given key if exists, null otherwise. Sets data change version number.- Specified by:
getin interfaceVersionedPersistentStore<V>- Parameters:
key- lookup keyversion- version holder
-
put
Description copied from interface:VersionedPersistentStoreStores the (key, value) tuple in the store. If tuple already exits, stores it only if versions match, otherwise throwsVersionMismatchExceptionLifetime of the tuple depends upon storemode.- Specified by:
putin interfaceVersionedPersistentStore<V>- Parameters:
key- lookup keyvalue- value to storeversion- version holder
-
getMode
Description copied from interface:StoreReturns storagemodeof this store. -
delete
Description copied from interface:StoreRemoves the value corresponding to the given key if exists, nothing happens otherwise. -
putIfAbsent
Description copied from interface:StoreStores the (key, value) tuple in the store only if it does not exists.- Specified by:
putIfAbsentin interfaceStore<V>- Parameters:
key- lookup keyvalue- value to store- Returns:
- true if put takes place, false otherwise.
-
getRange
Description copied from interface:StoreReturns an iterator of desired number of entries offsetting by the skip value. -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-