K
- Key type.V
- Value type.public interface NodeSelectionStringCommands<K,V>
Modifier and Type | Method and Description |
---|---|
Executions<Long> |
append(K key,
V value)
Append a value to a key.
|
Executions<Long> |
bitcount(K key)
Count set bits in a string.
|
Executions<Long> |
bitcount(K key,
long start,
long end)
Count set bits in a string.
|
Executions<List<Long>> |
bitfield(K key,
BitFieldArgs bitFieldArgs)
Execute
BITFIELD with its subcommands. |
Executions<Long> |
bitopAnd(K destination,
K... keys)
Perform bitwise AND between strings.
|
Executions<Long> |
bitopNot(K destination,
K source)
Perform bitwise NOT between strings.
|
Executions<Long> |
bitopOr(K destination,
K... keys)
Perform bitwise OR between strings.
|
Executions<Long> |
bitopXor(K destination,
K... keys)
Perform bitwise XOR between strings.
|
Executions<Long> |
bitpos(K key,
boolean state)
Find first bit set or clear in a string.
|
Executions<Long> |
bitpos(K key,
boolean state,
long start)
Find first bit set or clear in a string.
|
Executions<Long> |
bitpos(K key,
boolean state,
long start,
long end)
Find first bit set or clear in a string.
|
Executions<Long> |
decr(K key)
Decrement the integer value of a key by one.
|
Executions<Long> |
decrby(K key,
long amount)
Decrement the integer value of a key by the given number.
|
Executions<V> |
get(K key)
Get the value of a key.
|
Executions<Long> |
getbit(K key,
long offset)
Returns the bit value at offset in the string value stored at key.
|
Executions<V> |
getrange(K key,
long start,
long end)
Get a substring of the string stored at a key.
|
Executions<V> |
getset(K key,
V value)
Set the string value of a key and return its old value.
|
Executions<Long> |
incr(K key)
Increment the integer value of a key by one.
|
Executions<Long> |
incrby(K key,
long amount)
Increment the integer value of a key by the given amount.
|
Executions<Double> |
incrbyfloat(K key,
double amount)
Increment the float value of a key by the given amount.
|
Executions<List<KeyValue<K,V>>> |
mget(K... keys)
Get the values of all the given keys.
|
Executions<Long> |
mget(KeyValueStreamingChannel<K,V> channel,
K... keys)
Stream over the values of all the given keys.
|
Executions<String> |
mset(Map<K,V> map)
Set multiple keys to multiple values.
|
Executions<Boolean> |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.
|
Executions<String> |
psetex(K key,
long milliseconds,
V value)
Set the value and expiration in milliseconds of a key.
|
Executions<String> |
set(K key,
V value)
Set the string value of a key.
|
Executions<String> |
set(K key,
V value,
SetArgs setArgs)
Set the string value of a key.
|
Executions<Long> |
setbit(K key,
long offset,
int value)
Sets or clears the bit at offset in the string value stored at key.
|
Executions<String> |
setex(K key,
long seconds,
V value)
Set the value and expiration of a key.
|
Executions<Boolean> |
setnx(K key,
V value)
Set the value of a key, only if the key does not exist.
|
Executions<Long> |
setrange(K key,
long offset,
V value)
Overwrite part of a string at key starting at the specified offset.
|
Executions<StringMatchResult> |
stralgoLcs(StrAlgoArgs strAlgoArgs)
The STRALGO command implements complex algorithms that operate on strings.
|
Executions<Long> |
strlen(K key)
Get the length of the value stored in a key.
|
Executions<Long> append(K key, V value)
key
- the keyvalue
- the valueExecutions<Long> bitcount(K key)
key
- the keyExecutions<Long> bitcount(K key, long start, long end)
key
- the keystart
- the startend
- the endExecutions<List<Long>> bitfield(K key, BitFieldArgs bitFieldArgs)
BITFIELD
with its subcommands.key
- the keybitFieldArgs
- the args containing subcommands, must not be null
.Executions<Long> bitpos(K key, boolean state)
key
- the keystate
- the stateBITPOS 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.Executions<Long> bitpos(K key, boolean state, long start)
key
- the keystate
- the bit type: longstart
- the start type: longBITPOS 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.Executions<Long> bitpos(K key, boolean state, long start, long end)
key
- the keystate
- the bit type: longstart
- the start type: longend
- the end type: longBITPOS 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.Executions<Long> bitopAnd(K destination, K... keys)
destination
- result key of the operationkeys
- operation input key namesExecutions<Long> bitopNot(K destination, K source)
destination
- result key of the operationsource
- operation input key namesExecutions<Long> bitopOr(K destination, K... keys)
destination
- result key of the operationkeys
- operation input key namesExecutions<Long> bitopXor(K destination, K... keys)
destination
- result key of the operationkeys
- operation input key namesExecutions<Long> decr(K key)
key
- the keykey
after the decrementExecutions<Long> decrby(K key, long amount)
key
- the keyamount
- the decrement type: longkey
after the decrementExecutions<V> get(K key)
key
- the keykey
, or null
when key
does not exist.Executions<Long> getbit(K key, long offset)
key
- the keyoffset
- the offset type: longExecutions<V> getrange(K key, long start, long end)
key
- the keystart
- the start type: longend
- the end type: longExecutions<V> getset(K key, V value)
key
- the keyvalue
- the valuekey
, or null
when key
did not exist.Executions<Long> incr(K key)
key
- the keykey
after the incrementExecutions<Long> incrby(K key, long amount)
key
- the keyamount
- the increment type: longkey
after the incrementExecutions<Double> incrbyfloat(K key, double amount)
key
- the keyamount
- the increment type: doublekey
after the increment.Executions<List<KeyValue<K,V>>> mget(K... keys)
keys
- the keyExecutions<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
channel
- the channelkeys
- the keysExecutions<String> mset(Map<K,V> map)
map
- the nullOK
since MSET
can't fail.Executions<Boolean> msetnx(Map<K,V> map)
map
- the null1
if the all the keys were set. 0
if no key was set (at least one key already existed).Executions<String> set(K key, V value)
key
- the keyvalue
- the valueOK
if SET
was executed correctly.Executions<String> set(K key, V value, SetArgs setArgs)
key
- the keyvalue
- the valuesetArgs
- the setArgsOK
if SET
was executed correctly.Executions<Long> setbit(K key, long offset, int value)
key
- the keyoffset
- the offset type: longvalue
- the value type: stringExecutions<String> setex(K key, long seconds, V value)
key
- the keyseconds
- the seconds type: longvalue
- the valueExecutions<String> psetex(K key, long milliseconds, V value)
key
- the keymilliseconds
- the milliseconds type: longvalue
- the valueExecutions<Boolean> setnx(K key, V value)
key
- the keyvalue
- the value1
if the key was set 0
if the key was not setExecutions<Long> setrange(K key, long offset, V value)
key
- the keyoffset
- the offset type: longvalue
- the valueExecutions<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.Executions<Long> strlen(K key)
key
- the keykey
, or 0
when key
does not exist.Copyright © 2021 lettuce.io. All rights reserved.