Package org.apache.drill.exec.store.sys
Interface VersionedPersistentStore<V>
- Type Parameters:
V
-
- All Superinterfaces:
AutoCloseable
,Store<V>
- All Known Implementing Classes:
UndefinedVersionDelegatingStore
,VersionedDelegatingStore
,ZookeeperPersistentStore
Extension to the Store interface that supports versions
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(String key, DataChangeVersion version) Checks if lookup key is present in store.get
(String key, DataChangeVersion version) Returns the value for the given key if exists, null otherwise.void
put
(String key, V value, DataChangeVersion version) Stores the (key, value) tuple in the store.Methods inherited from interface java.lang.AutoCloseable
close
Methods inherited from interface org.apache.drill.exec.store.sys.Store
delete, getMode, getRange, putIfAbsent
-
Method Details
-
contains
Checks if lookup key is present in store. Sets data change version number.- Parameters:
key
- lookup keyversion
- version holder- Returns:
- true if store contains lookup key, false otherwise
-
get
Returns the value for the given key if exists, null otherwise. Sets data change version number.- Parameters:
key
- lookup keyversion
- version holder
-
put
Stores the (key, value) tuple in the store. If tuple already exits, stores it only if versions match, otherwise throwsVersionMismatchException
Lifetime of the tuple depends upon storemode
.- Parameters:
key
- lookup keyvalue
- value to storeversion
- version holder
-