Package org.apache.drill.exec.store.sys
Interface Store<V>
- Type Parameters:
V
- value type
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
PersistentStore<V>
,VersionedPersistentStore<V>
- All Known Implementing Classes:
BasePersistentStore
,CaseInsensitivePersistentStore
,HBasePersistentStore
,InMemoryStore
,LocalPersistentStore
,MongoPersistentStore
,NoWriteLocalStore
,UndefinedVersionDelegatingStore
,VersionedDelegatingStore
,ZookeeperPersistentStore
A Store interface used to store and retrieve instances of given value type.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes the value corresponding to the given key if exists, nothing happens otherwise.getMode()
Returns storagemode
of this store.getRange
(int skip, int take) Returns an iterator of desired number of entries offsetting by the skip value.boolean
putIfAbsent
(String key, V value) Stores the (key, value) tuple in the store only if it does not exists.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
getMode
PersistentStoreMode getMode()Returns storagemode
of this store. -
delete
Removes the value corresponding to the given key if exists, nothing happens otherwise.- Parameters:
key
- lookup key
-
putIfAbsent
Stores the (key, value) tuple in the store only if it does not exists.- Parameters:
key
- lookup keyvalue
- value to store- Returns:
- true if put takes place, false otherwise.
-
getRange
Returns an iterator of desired number of entries offsetting by the skip value.- Parameters:
skip
- number of records to skip from beginningtake
- max number of records to return
-