public interface IValueCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
Integer |
append(K key,
String value)
Append a
value to key. |
List<Long> |
bitField(K key,
org.springframework.data.redis.connection.BitFieldSubCommands subCommands)
Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored
at a given
key. |
Long |
countExistingKeys(Collection<K> keys)
Count the number of
keys that exist. |
Long |
decr(K key)
Decrement an integer value stored as string value under
key by one. |
Long |
decrBy(K key,
long delta)
Decrement an integer value stored as string value under
key by delta. |
Long |
del(Collection<K> keys)
Delete given
keys. |
Boolean |
del(K key)
Delete given
key. |
Boolean |
exists(K key)
Determine if given
key exists. |
Boolean |
expire(K key,
long timeoutSeconds)
Set time(Seconds) to live for given
key.. |
Boolean |
expireAt(K key,
Date date)
Set the expiration for given
key as a date timestamp. |
V |
get(K key)
Get the value of
key. |
Boolean |
getBit(K key,
long offset)
Get the bit value at
offset of value at key. |
String |
getRange(K key,
long start,
long end)
Get a substring of value of
key between begin and end. |
V |
getSet(K key,
V value)
Set
value of key and return its old value. |
Long |
incr(K key)
Increment an integer value stored as string value under
key by one. |
Long |
incrBy(K key,
long delta)
Increment an integer value stored as string value under
key by delta. |
List<V> |
mGet(Collection<K> keys)
Get multiple
keys. |
void |
mSet(Map<K,V> map)
Set multiple keys to multiple values using key-value pairs provided in
tuple. |
void |
mSet(Object... keysValues)
Set multiple keys to multiple values using key-value pairs.
|
Boolean |
persist(K key)
Remove the expiration from given
key. |
Boolean |
pExpire(K key,
long millTimeoutSeconds)
Set time(Seconds) to live for given
key.. |
void |
rename(K oldKey,
K newKey)
Rename key
oldKey to newKey. |
void |
set(K key,
V value)
Set
value for key. |
Boolean |
setBit(K key,
long offset,
boolean value)
Sets the bit at
offset in value stored at key. |
void |
setEx(K key,
long timeoutSeconds,
V value)
Set the
value and expiration timeout for key. |
void |
setEx(K key,
long timeout,
V value,
TimeUnit unit)
Set the
value and expiration timeout for key. |
Boolean |
setNx(K key,
V value)
Set
key to hold the string value if key is absent. |
Boolean |
setNx(K key,
V value,
long timeoutSeconds)
Set
key to hold the string value and expiration timeout if key is absent. |
Boolean |
setNx(K key,
V value,
long timeout,
TimeUnit unit)
Set
key to hold the string value and expiration timeout if key is absent. |
void |
setRange(K key,
V value,
long offset)
Overwrite parts of
key starting at the specified offset with given value. |
Boolean |
setXx(K key,
V value)
Set
key to hold the string value if key is present. |
Boolean |
setXx(K key,
V value,
long timeoutSeconds)
Set
key to hold the string value and expiration timeout if key is present. |
Boolean |
setXx(K key,
V value,
long timeout,
TimeUnit unit)
Set
key to hold the string value and expiration timeout if key is present. |
Long |
strLen(K key)
Get the length of the value stored at
key. |
Long |
ttl(K key)
Get the time to live for
key in seconds. |
org.springframework.data.redis.connection.DataType |
type(K key)
Determine the type stored at
key. |
void set(K key, V value)
value for key.key - must not be null.value - must not be null.void setEx(K key, long timeoutSeconds, V value)
value and expiration timeout for key.key - must not be null.value - must not be null.timeoutSeconds - the key expiration timeout.void setEx(K key, long timeout, V value, 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.@Nullable Boolean setNx(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 setNx(K key, V value, long timeoutSeconds)
key to hold the string value and expiration timeout if key is absent.key - must not be null.value - must not be null.timeoutSeconds - the key expiration timeout.@Nullable Boolean setNx(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 Boolean setXx(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 setXx(K key, V value, long timeoutSeconds)
key to hold the string value and expiration timeout if key is present.key - must not be null.value - must not be null.timeoutSeconds - the key expiration timeout.IllegalArgumentException - if either key, value or timeout is not present.@Nullable Boolean setXx(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 V get(K key)
key.key - must not be null.@Nullable Boolean del(K key)
key.key - must not be null.@Nullable Long del(Collection<K> keys)
keys.keys - must not be null.void mSet(Object... keysValues)
keysValues - must not be null.void mSet(Map<K,V> map)
tuple.map - must not be null.@Nullable List<V> mGet(Collection<K> keys)
keys. Values are returned in the order of the requested keys.keys - must not be null.@Nullable Long decr(K key)
key by one.key - must not be null.@Nullable Long decrBy(K key, long delta)
key by delta.key - must not be null.delta - @Nullable Long incr(K key)
key by one.key - must not be null.@Nullable Long incrBy(K key, long delta)
key by delta.key - must not be null.delta - @Nullable Boolean exists(K key)
key exists.key - must not be null.void rename(K oldKey, K newKey)
oldKey to newKey.oldKey - must not be null.newKey - must not be null.@Nullable Boolean expire(K key, long timeoutSeconds)
key..key - must not be null.timeoutSeconds - @Nullable Boolean expireAt(K key, Date date)
key as a date timestamp.key - must not be null.date - must not be null.@Nullable Boolean pExpire(K key, long millTimeoutSeconds)
key..key - must not be null.millTimeoutSeconds - @Nullable V getSet(K key, V value)
value of key and return its old value.key - must not be null.@Nullable Boolean persist(K key)
key.key - must not be null.@Nullable org.springframework.data.redis.connection.DataType type(K key)
key.key - must not be null.@Nullable Long ttl(K key)
key in seconds.key - must not be null.@Nullable Long countExistingKeys(Collection<K> keys)
keys that exist.keys - must not be null.@Nullable Integer append(K key, String value)
value to key.key - must not be null.value - @Nullable String getRange(K key, long start, long end)
key between begin and end.key - must not be null.start - end - void setRange(K key, V value, long offset)
key starting at the specified offset with given value.key - must not be null.value - offset - @Nullable Long strLen(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, org.springframework.data.redis.connection.BitFieldSubCommands subCommands)
key.key - must not be null.subCommands - must not be null.Copyright © 2021. All rights reserved.