Package org.apache.drill.exec.store.sys
Class CaseInsensitivePersistentStore<V>
java.lang.Object
org.apache.drill.exec.store.sys.CaseInsensitivePersistentStore<V>
- All Implemented Interfaces:
AutoCloseable
,PersistentStore<V>
,Store<V>
Wrapper around
PersistentStore
to ensure all passed keys are
converted to lower case and stored this way. This will ensure
case-insensitivity during insert, update, deletion or search.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
Checks if lookup key is present in store.void
Removes the value corresponding to the given key if exists, nothing happens otherwise.Returns the value for the given key if exists, null otherwise.getAll()
Returns an iterator of entries.getMode()
Returns storagemode
of this store.getRange
(int skip, int take) Returns an iterator of desired number of entries offsetting by the skip value.void
Stores the (key, value) tuple in the store.boolean
putIfAbsent
(String key, V value) Stores the (key, value) tuple in the store only if it does not exists.
-
Constructor Details
-
CaseInsensitivePersistentStore
-
-
Method Details
-
contains
Description copied from interface:PersistentStore
Checks if lookup key is present in store.- Specified by:
contains
in interfacePersistentStore<V>
- Parameters:
key
- lookup key- Returns:
- true if store contains lookup key, false otherwise
-
get
Description copied from interface:PersistentStore
Returns the value for the given key if exists, null otherwise.- Specified by:
get
in interfacePersistentStore<V>
- Parameters:
key
- lookup key
-
put
Description copied from interface:PersistentStore
Stores the (key, value) tuple in the store. Lifetime of the tuple depends upon storemode
.- Specified by:
put
in interfacePersistentStore<V>
- Parameters:
key
- lookup keyvalue
- value to store
-
getAll
Description copied from interface:PersistentStore
Returns an iterator of entries.- Specified by:
getAll
in interfacePersistentStore<V>
-
getMode
Description copied from interface:Store
Returns storagemode
of this store. -
delete
Description copied from interface:Store
Removes the value corresponding to the given key if exists, nothing happens otherwise. -
putIfAbsent
Description copied from interface:Store
Stores the (key, value) tuple in the store only if it does not exists.- Specified by:
putIfAbsent
in interfaceStore<V>
- Parameters:
key
- lookup keyvalue
- value to store- Returns:
- true if put takes place, false otherwise.
-
getRange
Description copied from interface:Store
Returns an iterator of desired number of entries offsetting by the skip value. -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-