public interface StringBinaryCommands extends BitBinaryCommands
| Modifier and Type | Method and Description |
|---|---|
long |
append(byte[] key,
byte[] value) |
long |
decr(byte[] key) |
long |
decrBy(byte[] key,
long decrement) |
byte[] |
get(byte[] key) |
byte[] |
getDel(byte[] key) |
byte[] |
getEx(byte[] key,
GetExParams params) |
byte[] |
getrange(byte[] key,
long startOffset,
long endOffset) |
byte[] |
getSet(byte[] key,
byte[] value)
Deprecated.
|
long |
incr(byte[] key) |
long |
incrBy(byte[] key,
long increment) |
double |
incrByFloat(byte[] key,
double increment) |
LCSMatchResult |
lcs(byte[] keyA,
byte[] keyB,
LCSParams params)
Calculate the longest common subsequence of keyA and keyB.
|
java.util.List<byte[]> |
mget(byte[]... keys) |
java.lang.String |
mset(byte[]... keysvalues) |
boolean |
msetex(MSetExParams params,
byte[]... keysvalues)
Multi-set with optional condition and expiration.
|
long |
msetnx(byte[]... keysvalues) |
java.lang.String |
psetex(byte[] key,
long milliseconds,
byte[] value) |
java.lang.String |
set(byte[] key,
byte[] value) |
java.lang.String |
set(byte[] key,
byte[] value,
SetParams params) |
java.lang.String |
setex(byte[] key,
long seconds,
byte[] value) |
byte[] |
setGet(byte[] key,
byte[] value) |
byte[] |
setGet(byte[] key,
byte[] value,
SetParams params) |
long |
setnx(byte[] key,
byte[] value) |
long |
setrange(byte[] key,
long offset,
byte[] value) |
long |
strlen(byte[] key) |
byte[] |
substr(byte[] key,
int start,
int end) |
java.lang.String set(byte[] key,
byte[] value)
java.lang.String set(byte[] key,
byte[] value,
SetParams params)
byte[] get(byte[] key)
byte[] setGet(byte[] key,
byte[] value)
byte[] setGet(byte[] key,
byte[] value,
SetParams params)
byte[] getDel(byte[] key)
byte[] getEx(byte[] key,
GetExParams params)
long setrange(byte[] key,
long offset,
byte[] value)
byte[] getrange(byte[] key,
long startOffset,
long endOffset)
@Deprecated
byte[] getSet(byte[] key,
byte[] value)
setGet(byte[], byte[]).long setnx(byte[] key,
byte[] value)
java.lang.String setex(byte[] key,
long seconds,
byte[] value)
java.lang.String psetex(byte[] key,
long milliseconds,
byte[] value)
java.util.List<byte[]> mget(byte[]... keys)
java.lang.String mset(byte[]... keysvalues)
long msetnx(byte[]... keysvalues)
boolean msetex(MSetExParams params, byte[]... keysvalues)
Sets the respective keys to the respective values, similar to MSET,
but allows conditional set (NX|XX) and expiration options via MSetExParams.
If the condition is not met for any key, no key is set.
Both MSET and MSETEX are atomic operations. This means that if multiple keys are provided, another client will either see the changes for all keys at once, or no changes at all.
Options (in MSetExParams): NX or XX, and expiration: EX seconds | PX milliseconds |
EXAT unix-time-seconds | PXAT unix-time-milliseconds | KEEPTTL.
Time complexity: O(N) where N is the number of keys to set.
params - condition and expiration parameterskeysvalues - pairs of keys and their values, e.g. msetex(params, "foo".getBytes(), "foovalue".getBytes(), "bar".getBytes(), "barvalue".getBytes())true if all the keys were set, false if none were set (condition not satisfied)#mset(byte[]...),
#msetnx(byte[]...)long incr(byte[] key)
long incrBy(byte[] key,
long increment)
double incrByFloat(byte[] key,
double increment)
long decr(byte[] key)
long decrBy(byte[] key,
long decrement)
long append(byte[] key,
byte[] value)
byte[] substr(byte[] key,
int start,
int end)
long strlen(byte[] key)
LCSMatchResult lcs(byte[] keyA, byte[] keyB, LCSParams params)
keyA - keyB - params - Copyright © 2025. All rights reserved.