V
- store value typepublic class UndefinedVersionDelegatingStore<V> extends Object implements VersionedPersistentStore<V>
DataChangeVersion.UNDEFINED
when version is required.Constructor and Description |
---|
UndefinedVersionDelegatingStore(PersistentStore<V> store) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
contains(String key,
DataChangeVersion version)
Checks if lookup key is present in store.
|
void |
delete(String key)
Removes the value corresponding to the given key if exists, nothing happens otherwise.
|
V |
get(String key,
DataChangeVersion version)
Returns the value for the given key if exists, null otherwise.
|
PersistentStoreMode |
getMode()
Returns storage
mode of this store. |
Iterator<Map.Entry<String,V>> |
getRange(int skip,
int take)
Returns an iterator of desired number of entries offsetting by the skip value.
|
void |
put(String key,
V value,
DataChangeVersion version)
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.
|
public UndefinedVersionDelegatingStore(PersistentStore<V> store)
public boolean contains(String key, DataChangeVersion version)
VersionedPersistentStore
contains
in interface VersionedPersistentStore<V>
key
- lookup keyversion
- version holderpublic V get(String key, DataChangeVersion version)
VersionedPersistentStore
get
in interface VersionedPersistentStore<V>
key
- lookup keyversion
- version holderpublic void put(String key, V value, DataChangeVersion version)
VersionedPersistentStore
VersionMismatchException
Lifetime of the tuple depends upon store mode
.put
in interface VersionedPersistentStore<V>
key
- lookup keyvalue
- value to storeversion
- version holderpublic PersistentStoreMode getMode()
Store
mode
of this store.public void delete(String key)
Store
public boolean putIfAbsent(String key, V value)
Store
putIfAbsent
in interface Store<V>
key
- lookup keyvalue
- value to storepublic Iterator<Map.Entry<String,V>> getRange(int skip, int take)
Store
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 1970 The Apache Software Foundation. All rights reserved.