public interface ValueOperations<K,V>
| Modifier and Type | Method and Description |
|---|---|
Integer |
append(K key,
String value)
Append a
value to key. |
List<Long> |
bitField(K key,
BitFieldSubCommands subCommands)
Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored
at a given
key. |
Long |
decrement(K key)
Decrement an integer value stored as string value under
key by one. |
Long |
decrement(K key,
long delta)
Decrement an integer value stored as string value under
key by delta. |
String |
get(K key,
long start,
long end)
Get a substring of value of
key between begin and end. |
V |
get(Object key)
Get the value of
key. |
V |
getAndSet(K key,
V value)
Set
value of key and return its old value. |
Boolean |
getBit(K key,
long offset)
Get the bit value at
offset of value at key. |
RedisOperations<K,V> |
getOperations() |
Long |
increment(K key)
Increment an integer value stored as string value under
key by one. |
Double |
increment(K key,
double delta)
Increment a floating point number value stored as string value under
key by delta. |
Long |
increment(K key,
long delta)
Increment an integer value stored as string value under
key by delta. |
List<V> |
multiGet(Collection<K> keys)
Get multiple
keys. |
void |
multiSet(Map<? extends K,? extends V> map)
Set multiple keys to multiple values using key-value pairs provided in
tuple. |
Boolean |
multiSetIfAbsent(Map<? extends K,? extends V> map)
Set multiple keys to multiple values using key-value pairs provided in
tuple only if the provided key does
not exist. |
void |
set(K key,
V value)
Set
value for key. |
default void |
set(K key,
V value,
Duration timeout)
Set the
value and expiration timeout for key. |
void |
set(K key,
V value,
long offset)
Overwrite parts of
key starting at the specified offset with given value. |
void |
set(K key,
V value,
long timeout,
TimeUnit unit)
Set the
value and expiration timeout for key. |
Boolean |
setBit(K key,
long offset,
boolean value)
Sets the bit at
offset in value stored at key. |
Boolean |
setIfAbsent(K key,
V value)
Set
key to hold the string value if key is absent. |
default Boolean |
setIfAbsent(K key,
V value,
Duration timeout)
Set
key to hold the string value and expiration timeout if key is absent. |
Boolean |
setIfAbsent(K key,
V value,
long timeout,
TimeUnit unit)
Set
key to hold the string value and expiration timeout if key is absent. |
Boolean |
setIfPresent(K key,
V value)
Set
key to hold the string value if key is present. |
default Boolean |
setIfPresent(K key,
V value,
Duration timeout)
Set
key to hold the string value and expiration timeout if key is present. |
Boolean |
setIfPresent(K key,
V value,
long timeout,
TimeUnit unit)
Set
key to hold the string value and expiration timeout if key is present. |
Long |
size(K key)
Get the length of the value stored at
key. |
void set(K key, V value)
value for key.key - must not be null.value - must not be null.void set(K key, V value, long timeout, TimeUnit unit)
value and expiration timeout for key.key - must not be null.value - must not be null.timeout - the key expiration timeout.unit - must not be null.default void set(K key, V value, Duration timeout)
value and expiration timeout for key.key - must not be null.value - must not be null.timeout - must not be null.IllegalArgumentException - if either key, value or timeout is not present.@Nullable Boolean setIfAbsent(K key, V value)
key to hold the string value if key is absent.key - must not be null.value - must not be null.@Nullable Boolean setIfAbsent(K key, V value, long timeout, TimeUnit unit)
key to hold the string value and expiration timeout if key is absent.key - must not be null.value - must not be null.timeout - the key expiration timeout.unit - must not be null.@Nullable default Boolean setIfAbsent(K key, V value, Duration timeout)
key to hold the string value and expiration timeout if key is absent.key - must not be null.value - must not be null.timeout - must not be null.IllegalArgumentException - if either key, value or timeout is not present.@Nullable Boolean setIfPresent(K key, V value)
key to hold the string value if key is present.key - must not be null.value - must not be null.IllegalArgumentException - if either key or value is not present.@Nullable Boolean setIfPresent(K key, V value, long timeout, TimeUnit unit)
key to hold the string value and expiration timeout if key is present.key - must not be null.value - must not be null.timeout - the key expiration timeout.unit - must not be null.IllegalArgumentException - if either key, value or timeout is not present.@Nullable default Boolean setIfPresent(K key, V value, Duration timeout)
key to hold the string value and expiration timeout if key is present.key - must not be null.value - must not be null.timeout - must not be null.IllegalArgumentException - if either key, value or timeout is not present.void multiSet(Map<? extends K,? extends V> map)
tuple.map - must not be null.@Nullable Boolean multiSetIfAbsent(Map<? extends K,? extends V> map)
tuple only if the provided key does
not exist.map - must not be null.@Nullable V get(Object key)
key.key - must not be null.@Nullable V getAndSet(K key, V value)
value of key and return its old value.key - must not be null.@Nullable List<V> multiGet(Collection<K> keys)
keys. Values are returned in the order of the requested keys.keys - must not be null.@Nullable Long increment(K key)
key by one.key - must not be null.@Nullable Long increment(K key, long delta)
key by delta.key - must not be null.delta - @Nullable Double increment(K key, double delta)
key by delta.key - must not be null.delta - @Nullable Long decrement(K key)
key by one.key - must not be null.@Nullable Long decrement(K key, long delta)
key by delta.key - must not be null.delta - @Nullable Integer append(K key, String value)
value to key.key - must not be null.value - @Nullable String get(K key, long start, long end)
key between begin and end.key - must not be null.start - end - void set(K key, V value, long offset)
key starting at the specified offset with given value.key - must not be null.value - offset - @Nullable Long size(K key)
key.key - must not be null.@Nullable Boolean setBit(K key, long offset, boolean value)
offset in value stored at key.key - must not be null.offset - value - @Nullable Boolean getBit(K key, long offset)
offset of value at key.key - must not be null.offset - @Nullable List<Long> bitField(K key, BitFieldSubCommands subCommands)
key.key - must not be null.subCommands - must not be null.RedisOperations<K,V> getOperations()
Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.