Interface NodeSelectionStringAsyncCommands<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Known Subinterfaces:
NodeSelectionAsyncCommands<K,V>
public interface NodeSelectionStringAsyncCommands<K,V>
Asynchronous executed commands on a node selection for Strings.- Since:
- 4.0
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateAsyncNodeSelectionClusterApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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)
ExecuteBITFIELD
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<Long>
mget(KeyValueStreamingChannel<K,V> channel, K... keys)
Stream over the values of all the given keys.AsyncExecutions<List<KeyValue<K,V>>>
mget(K... keys)
Get 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.
-
-
-
Method Detail
-
append
AsyncExecutions<Long> append(K key, V value)
Append a value to a key.- Parameters:
key
- the key.value
- the value.- Returns:
- Long integer-reply the length of the string after the append operation.
-
bitcount
AsyncExecutions<Long> bitcount(K key)
Count set bits in a string.- Parameters:
key
- the key.- Returns:
- Long integer-reply The number of bits set to 1.
-
bitcount
AsyncExecutions<Long> bitcount(K key, long start, long end)
Count set bits in a string.- Parameters:
key
- the key.start
- the start.end
- the end.- Returns:
- Long integer-reply The number of bits set to 1.
-
bitfield
AsyncExecutions<List<Long>> bitfield(K key, BitFieldArgs bitFieldArgs)
ExecuteBITFIELD
with its subcommands.- Parameters:
key
- the key.bitFieldArgs
- the args containing subcommands, must not benull
.- Returns:
- Long bulk-reply the results from the bitfield commands.
-
bitpos
AsyncExecutions<Long> bitpos(K key, boolean state)
Find first bit set or clear in a string.- Parameters:
key
- the key.state
- the state.- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request.
If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is
returned.
If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns
the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the
command
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.
-
bitpos
AsyncExecutions<Long> bitpos(K key, boolean state, long start)
Find first bit set or clear in a string.- Parameters:
key
- the key.state
- the bit type: long.start
- the start type: long.- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request.
If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is
returned.
If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns
the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the
command
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. - Since:
- 5.0.1
-
bitpos
AsyncExecutions<Long> bitpos(K key, boolean state, long start, long end)
Find first bit set or clear in a string.- Parameters:
key
- the key.state
- the bit type: long.start
- the start type: long.end
- the end type: long.- Returns:
- Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request.
If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is
returned.
If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns
the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the
command
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.
-
bitopAnd
AsyncExecutions<Long> bitopAnd(K destination, K... keys)
Perform bitwise AND between strings.- Parameters:
destination
- result key of the operation.keys
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopNot
AsyncExecutions<Long> bitopNot(K destination, K source)
Perform bitwise NOT between strings.- Parameters:
destination
- result key of the operation.source
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopOr
AsyncExecutions<Long> bitopOr(K destination, K... keys)
Perform bitwise OR between strings.- Parameters:
destination
- result key of the operation.keys
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
bitopXor
AsyncExecutions<Long> bitopXor(K destination, K... keys)
Perform bitwise XOR between strings.- Parameters:
destination
- result key of the operation.keys
- operation input key names.- Returns:
- Long integer-reply The size of the string stored in the destination key, that is equal to the size of the longest input string.
-
decr
AsyncExecutions<Long> decr(K key)
Decrement the integer value of a key by one.- Parameters:
key
- the key.- Returns:
- Long integer-reply the value of
key
after the decrement.
-
decrby
AsyncExecutions<Long> decrby(K key, long amount)
Decrement the integer value of a key by the given number.- Parameters:
key
- the key.amount
- the decrement type: long.- Returns:
- Long integer-reply the value of
key
after the decrement.
-
get
AsyncExecutions<V> get(K key)
Get the value of a key.- Parameters:
key
- the key.- Returns:
- V bulk-string-reply the value of
key
, ornull
whenkey
does not exist.
-
getbit
AsyncExecutions<Long> getbit(K key, long offset)
Returns the bit value at offset in the string value stored at key.- Parameters:
key
- the key.offset
- the offset type: long.- Returns:
- Long integer-reply the bit value stored at offset.
-
getdel
AsyncExecutions<V> getdel(K key)
Get the value of key and delete the key.- Parameters:
key
- the key.- Returns:
- V bulk-string-reply the value of
key
, ornull
whenkey
does not exist. - Since:
- 6.1
-
getex
AsyncExecutions<V> getex(K key, GetExArgs args)
Get the value of key and optionally set its expiration.- Parameters:
key
- the key.args
- the arguments forGETEX
.- Returns:
- V bulk-string-reply the value of
key
, ornull
whenkey
does not exist. - Since:
- 6.1
-
getrange
AsyncExecutions<V> getrange(K key, long start, long end)
Get a substring of the string stored at a key.- Parameters:
key
- the key.start
- the start type: long.end
- the end type: long.- Returns:
- V bulk-string-reply.
-
getset
AsyncExecutions<V> getset(K key, V value)
Set the string value of a key and return its old value.- Parameters:
key
- the key.value
- the value.- Returns:
- V bulk-string-reply the old value stored at
key
, ornull
whenkey
did not exist.
-
incr
AsyncExecutions<Long> incr(K key)
Increment the integer value of a key by one.- Parameters:
key
- the key.- Returns:
- Long integer-reply the value of
key
after the increment.
-
incrby
AsyncExecutions<Long> incrby(K key, long amount)
Increment the integer value of a key by the given amount.- Parameters:
key
- the key.amount
- the increment type: long.- Returns:
- Long integer-reply the value of
key
after the increment.
-
incrbyfloat
AsyncExecutions<Double> incrbyfloat(K key, double amount)
Increment the float value of a key by the given amount.- Parameters:
key
- the key.amount
- the increment type: double.- Returns:
- Double bulk-string-reply the value of
key
after the increment.
-
mget
AsyncExecutions<List<KeyValue<K,V>>> mget(K... keys)
Get the values of all the given keys.- Parameters:
keys
- the key.- Returns:
- List<V> array-reply list of values at the specified keys.
-
mget
AsyncExecutions<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
Stream over the values of all the given keys.- Parameters:
channel
- the channel.keys
- the keys.- Returns:
- Long array-reply list of values at the specified keys.
-
mset
AsyncExecutions<String> mset(Map<K,V> map)
Set multiple keys to multiple values.- Parameters:
map
- the map.- Returns:
- String simple-string-reply always
OK
sinceMSET
can't fail.
-
msetnx
AsyncExecutions<Boolean> msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.- Parameters:
map
- the map.- Returns:
- Boolean integer-reply specifically:
1
if the all the keys were set.0
if no key was set (at least one key already existed).
-
set
AsyncExecutions<String> set(K key, V value)
Set the string value of a key.- Parameters:
key
- the key.value
- the value.- Returns:
- String simple-string-reply
OK
ifSET
was executed correctly.
-
set
AsyncExecutions<String> set(K key, V value, SetArgs setArgs)
Set the string value of a key.- Parameters:
key
- the key.value
- the value.setArgs
- the setArgs.- Returns:
- String simple-string-reply
OK
ifSET
was executed correctly.
-
setGet
AsyncExecutions<V> setGet(K key, V value)
Set the string value of a key and return its old value.- Parameters:
key
- the key.value
- the value.- Returns:
- V bulk-string-reply the old value stored at
key
, ornull
whenkey
did not exist. - Since:
- 6.1
-
setGet
AsyncExecutions<V> setGet(K key, V value, SetArgs setArgs)
Set the string value of a key and return its old value.- Parameters:
key
- the key.value
- the value.setArgs
- the command arguments.- Returns:
- V bulk-string-reply the old value stored at
key
, ornull
whenkey
did not exist. - Since:
- 6.1
-
setbit
AsyncExecutions<Long> setbit(K key, long offset, int value)
Sets or clears the bit at offset in the string value stored at key.- Parameters:
key
- the key.offset
- the offset type: long.value
- the value type: string.- Returns:
- Long integer-reply the original bit value stored at offset.
-
setex
AsyncExecutions<String> setex(K key, long seconds, V value)
Set the value and expiration of a key.- Parameters:
key
- the key.seconds
- the seconds type: long.value
- the value.- Returns:
- String simple-string-reply.
-
psetex
AsyncExecutions<String> psetex(K key, long milliseconds, V value)
Set the value and expiration in milliseconds of a key.- Parameters:
key
- the key.milliseconds
- the milliseconds type: long.value
- the value.- Returns:
- String simple-string-reply.
-
setnx
AsyncExecutions<Boolean> setnx(K key, V value)
Set the value of a key, only if the key does not exist.- Parameters:
key
- the key.value
- the value.- Returns:
- Boolean integer-reply specifically:
1
if the key was set0
if the key was not set.
-
setrange
AsyncExecutions<Long> setrange(K key, long offset, V value)
Overwrite part of a string at key starting at the specified offset.- Parameters:
key
- the key.offset
- the offset type: long.value
- the value.- Returns:
- Long integer-reply the length of the string after it was modified by the command.
-
stralgoLcs
AsyncExecutions<StringMatchResult> stralgoLcs(StrAlgoArgs strAlgoArgs)
The STRALGO command implements complex algorithms that operate on strings. This method uses the LCS algorithm (longest common substring).- Without modifiers the string representing the longest common substring is returned.
- When
LEN
is given the command returns the length of the longest common substring. - When
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. WhenWITHMATCHLEN
is given each array representing a match will also have the length of the match.
- Parameters:
strAlgoArgs
- command arguments.- Returns:
- StringMatchResult.
- Since:
- 6.0
-
strlen
AsyncExecutions<Long> strlen(K key)
Get the length of the value stored in a key.- Parameters:
key
- the key.- Returns:
- Long integer-reply the length of the string at
key
, or0
whenkey
does not exist.
-
-