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) |
java.util.List<java.lang.Long> |
increx(byte[] key)
Increment the integer number stored at key by 1.
|
java.util.List<java.lang.Double> |
increx(byte[] key,
double increment,
IncrexFloatParams params)
Increment the floating-point number stored at key by
increment, with optional bounds,
saturation, and expiration control. |
java.util.List<java.lang.Long> |
increx(byte[] key,
long increment,
IncrexParams params)
Increment the integer number stored at key by
increment, with optional bounds,
saturation, and expiration control. |
LCSMatchResult |
lcs(byte[] keyA,
byte[] keyB,
LCSParams params)
Calculate the longest common subsequence of keyA and keyB.
|
java.util.List<byte[]> |
mget(byte[]... keys)
Get the values of all the specified 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)
Deprecated.
Use
set(byte[], byte[], SetParams) with SetParams.px(long).
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.6.12. |
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)
Deprecated.
Use
set(byte[], byte[], SetParams) with SetParams.ex(long).
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.6.12. |
byte[] |
setGet(byte[] key,
byte[] value) |
byte[] |
setGet(byte[] key,
byte[] value,
SetParams params) |
long |
setnx(byte[] key,
byte[] value)
Deprecated.
Use
set(byte[], byte[], SetParams) with SetParams.nx().
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.6.12. |
long |
setrange(byte[] key,
long offset,
byte[] value) |
long |
strlen(byte[] key) |
byte[] |
substr(byte[] key,
int start,
int end)
Deprecated.
Use
getrange(byte[], long, long).
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.0.0. |
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[]).@Deprecated
long setnx(byte[] key,
byte[] value)
set(byte[], byte[], SetParams) with SetParams.nx().
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.6.12.@Deprecated
java.lang.String setex(byte[] key,
long seconds,
byte[] value)
set(byte[], byte[], SetParams) with SetParams.ex(long).
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.6.12.@Deprecated
java.lang.String psetex(byte[] key,
long milliseconds,
byte[] value)
set(byte[], byte[], SetParams) with SetParams.px(long).
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.6.12.java.util.List<byte[]> mget(byte[]... keys)
At least one key must be supplied; otherwise the server returns an error.
keys - the keys to getkeys;
entries are null for keys that do not exist or do not hold a string valueStringCommands.mget(String...)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)
java.util.List<java.lang.Long> increx(byte[] key)
key - the key[newValue, appliedIncrement]StringCommands.increx(String)java.util.List<java.lang.Long> increx(byte[] key,
long increment,
IncrexParams params)
increment, with optional bounds,
saturation, and expiration control.key - the keyincrement - the integer amount to increment by (may be negative)params - optional bounds, SATURATE flag, and expiration options[newValue, appliedIncrement]StringCommands.increx(String, long, IncrexParams)java.util.List<java.lang.Double> increx(byte[] key,
double increment,
IncrexFloatParams params)
increment, with optional bounds,
saturation, and expiration control.key - the keyincrement - the floating-point amount to increment by (may be negative)params - optional bounds, SATURATE flag, and expiration options[newValue, appliedIncrement]StringCommands.increx(String, double, IncrexFloatParams)long decr(byte[] key)
long decrBy(byte[] key,
long decrement)
long append(byte[] key,
byte[] value)
@Deprecated
byte[] substr(byte[] key,
int start,
int end)
getrange(byte[], long, long).
Deprecated in Jedis 7.3.0. Mirrors Redis deprecation since 2.0.0.long strlen(byte[] key)
LCSMatchResult lcs(byte[] keyA, byte[] keyB, LCSParams params)
keyA - keyB - params - Copyright © 2026. All rights reserved.