K
- Key type.V
- Value type.public interface NodeSelectionStringAsyncCommands<K,V>
Modifier and Type | Method and Description |
---|---|
AsyncExecutions<Long> |
append(K key,
V value)
Append a value to a key.
|
AsyncExecutions<Long> |
bitcount(K key)
Count set bits in a string.
|
AsyncExecutions<Long> |
bitcount(K key,
long start,
long end)
Count set bits in a string.
|
AsyncExecutions<List<Long>> |
bitfield(K key,
BitFieldArgs bitFieldArgs)
Execute
BITFIELD with its subcommands. |
AsyncExecutions<Long> |
bitopAnd(K destination,
K... keys)
Perform bitwise AND between strings.
|
AsyncExecutions<Long> |
bitopNot(K destination,
K source)
Perform bitwise NOT between strings.
|
AsyncExecutions<Long> |
bitopOr(K destination,
K... keys)
Perform bitwise OR between strings.
|
AsyncExecutions<Long> |
bitopXor(K destination,
K... keys)
Perform bitwise XOR between strings.
|
AsyncExecutions<Long> |
bitpos(K key,
boolean state)
Find first bit set or clear in a string.
|
AsyncExecutions<Long> |
bitpos(K key,
boolean state,
long start)
Find first bit set or clear in a string.
|
AsyncExecutions<Long> |
bitpos(K key,
boolean state,
long start,
long end)
Find first bit set or clear in a string.
|
AsyncExecutions<Long> |
decr(K key)
Decrement the integer value of a key by one.
|
AsyncExecutions<Long> |
decrby(K key,
long amount)
Decrement the integer value of a key by the given number.
|
AsyncExecutions<V> |
get(K key)
Get the value of a key.
|
AsyncExecutions<Long> |
getbit(K key,
long offset)
Returns the bit value at offset in the string value stored at key.
|
AsyncExecutions<V> |
getdel(K key)
Get the value of key and delete the key.
|
AsyncExecutions<V> |
getex(K key,
GetExArgs args)
Get the value of key and optionally set its expiration.
|
AsyncExecutions<V> |
getrange(K key,
long start,
long end)
Get a substring of the string stored at a key.
|
AsyncExecutions<V> |
getset(K key,
V value)
Set the string value of a key and return its old value.
|
AsyncExecutions<Long> |
incr(K key)
Increment the integer value of a key by one.
|
AsyncExecutions<Long> |
incrby(K key,
long amount)
Increment the integer value of a key by the given amount.
|
AsyncExecutions<Double> |
incrbyfloat(K key,
double amount)
Increment the float value of a key by the given amount.
|
AsyncExecutions<List<KeyValue<K,V>>> |
mget(K... keys)
Get the values of all the given keys.
|
AsyncExecutions<Long> |
mget(KeyValueStreamingChannel<K,V> channel,
K... keys)
Stream over the values of all the given keys.
|
AsyncExecutions<String> |
mset(Map<K,V> map)
Set multiple keys to multiple values.
|
AsyncExecutions<Boolean> |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.
|
AsyncExecutions<String> |
psetex(K key,
long milliseconds,
V value)
Set the value and expiration in milliseconds of a key.
|
AsyncExecutions<String> |
set(K key,
V value)
Set the string value of a key.
|
AsyncExecutions<String> |
set(K key,
V value,
SetArgs setArgs)
Set the string value of a key.
|
AsyncExecutions<Long> |
setbit(K key,
long offset,
int value)
Sets or clears the bit at offset in the string value stored at key.
|
AsyncExecutions<String> |
setex(K key,
long seconds,
V value)
Set the value and expiration of a key.
|
AsyncExecutions<V> |
setGet(K key,
V value)
Set the string value of a key and return its old value.
|
AsyncExecutions<V> |
setGet(K key,
V value,
SetArgs setArgs)
Set the string value of a key and return its old value.
|
AsyncExecutions<Boolean> |
setnx(K key,
V value)
Set the value of a key, only if the key does not exist.
|
AsyncExecutions<Long> |
setrange(K key,
long offset,
V value)
Overwrite part of a string at key starting at the specified offset.
|
AsyncExecutions<StringMatchResult> |
stralgoLcs(StrAlgoArgs strAlgoArgs)
The STRALGO command implements complex algorithms that operate on strings.
|
AsyncExecutions<Long> |
strlen(K key)
Get the length of the value stored in a key.
|
AsyncExecutions<Long> append(K key, V value)
key
- the key.value
- the value.AsyncExecutions<Long> bitcount(K key)
key
- the key.AsyncExecutions<Long> bitcount(K key, long start, long end)
key
- the key.start
- the start.end
- the end.AsyncExecutions<List<Long>> bitfield(K key, BitFieldArgs bitFieldArgs)
BITFIELD
with its subcommands.key
- the key.bitFieldArgs
- the args containing subcommands, must not be null
.AsyncExecutions<Long> bitpos(K key, boolean state)
key
- the key.state
- the state.BITPOS key 0
will return 24, since up to bit 23 all the bits are 1.
Basically the function consider the right of the string as padded with zeros if you look for clear bits and
specify no range or the start argument only.AsyncExecutions<Long> bitpos(K key, boolean state, long start)
key
- the key.state
- the bit type: long.start
- the start type: long.BITPOS key 0
will return 24, since up to bit 23 all the bits are 1.
Basically the function consider the right of the string as padded with zeros if you look for clear bits and
specify no range or the start argument only.AsyncExecutions<Long> bitpos(K key, boolean state, long start, long end)
key
- the key.state
- the bit type: long.start
- the start type: long.end
- the end type: long.BITPOS key 0
will return 24, since up to bit 23 all the bits are 1.
Basically the function consider the right of the string as padded with zeros if you look for clear bits and
specify no range or the start argument only.
However this behavior changes if you are looking for clear bits and specify a range with both
start and end. If no clear bit is found in the specified range, the function
returns -1 as the user specified a clear range and there are no 0 bits in that range.AsyncExecutions<Long> bitopAnd(K destination, K... keys)
destination
- result key of the operation.keys
- operation input key names.AsyncExecutions<Long> bitopNot(K destination, K source)
destination
- result key of the operation.source
- operation input key names.AsyncExecutions<Long> bitopOr(K destination, K... keys)
destination
- result key of the operation.keys
- operation input key names.AsyncExecutions<Long> bitopXor(K destination, K... keys)
destination
- result key of the operation.keys
- operation input key names.AsyncExecutions<Long> decr(K key)
key
- the key.key
after the decrement.AsyncExecutions<Long> decrby(K key, long amount)
key
- the key.amount
- the decrement type: long.key
after the decrement.AsyncExecutions<V> get(K key)
key
- the key.key
, or null
when key
does not exist.AsyncExecutions<Long> getbit(K key, long offset)
key
- the key.offset
- the offset type: long.AsyncExecutions<V> getdel(K key)
key
- the key.key
, or null
when key
does not exist.AsyncExecutions<V> getex(K key, GetExArgs args)
key
- the key.args
- the arguments for GETEX
.key
, or null
when key
does not exist.AsyncExecutions<V> getrange(K key, long start, long end)
key
- the key.start
- the start type: long.end
- the end type: long.AsyncExecutions<V> getset(K key, V value)
key
- the key.value
- the value.key
, or null
when key
did not exist.AsyncExecutions<Long> incr(K key)
key
- the key.key
after the increment.AsyncExecutions<Long> incrby(K key, long amount)
key
- the key.amount
- the increment type: long.key
after the increment.AsyncExecutions<Double> incrbyfloat(K key, double amount)
key
- the key.amount
- the increment type: double.key
after the increment.AsyncExecutions<List<KeyValue<K,V>>> mget(K... keys)
keys
- the key.AsyncExecutions<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
channel
- the channel.keys
- the keys.AsyncExecutions<String> mset(Map<K,V> map)
map
- the map.OK
since MSET
can't fail.AsyncExecutions<Boolean> msetnx(Map<K,V> map)
map
- the map.1
if the all the keys were set. 0
if no key was set (at least one key already existed).AsyncExecutions<String> set(K key, V value)
key
- the key.value
- the value.OK
if SET
was executed correctly.AsyncExecutions<String> set(K key, V value, SetArgs setArgs)
key
- the key.value
- the value.setArgs
- the setArgs.OK
if SET
was executed correctly.AsyncExecutions<V> setGet(K key, V value)
key
- the key.value
- the value.key
, or null
when key
did not exist.AsyncExecutions<V> setGet(K key, V value, SetArgs setArgs)
key
- the key.value
- the value.setArgs
- the command arguments.key
, or null
when key
did not exist.AsyncExecutions<Long> setbit(K key, long offset, int value)
key
- the key.offset
- the offset type: long.value
- the value type: string.AsyncExecutions<String> setex(K key, long seconds, V value)
key
- the key.seconds
- the seconds type: long.value
- the value.AsyncExecutions<String> psetex(K key, long milliseconds, V value)
key
- the key.milliseconds
- the milliseconds type: long.value
- the value.AsyncExecutions<Boolean> setnx(K key, V value)
key
- the key.value
- the value.1
if the key was set 0
if the key was not set.AsyncExecutions<Long> setrange(K key, long offset, V value)
key
- the key.offset
- the offset type: long.value
- the value.AsyncExecutions<StringMatchResult> stralgoLcs(StrAlgoArgs strAlgoArgs)
LEN
is given the command returns the length of the longest common substring.IDX
is given the command returns an array with the LCS length and all the ranges
in both the strings, start and end offset for each string, where there are matches. When
WITHMATCHLEN
is given each array representing a match will also have the length of the
match.strAlgoArgs
- command arguments.AsyncExecutions<Long> strlen(K key)
key
- the key.key
, or 0
when key
does not exist.Copyright © 2025 lettuce.io. All rights reserved.