public class UnifiedJedis extends java.lang.Object implements JedisCommands, JedisBinaryCommands, SampleKeyedCommands, SampleBinaryKeyedCommands, RedisModuleCommands, java.lang.AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected CommandObjects |
commandObjects |
protected CommandExecutor |
executor |
protected RedisProtocol |
protocol
Deprecated.
|
protected ConnectionProvider |
provider |
| Modifier | Constructor and Description |
|---|---|
|
UnifiedJedis() |
|
UnifiedJedis(ClusterConnectionProvider provider,
int maxAttempts,
java.time.Duration maxTotalRetriesDuration)
Deprecated.
|
protected |
UnifiedJedis(ClusterConnectionProvider provider,
int maxAttempts,
java.time.Duration maxTotalRetriesDuration,
RedisProtocol protocol)
Deprecated.
|
protected |
UnifiedJedis(ClusterConnectionProvider provider,
int maxAttempts,
java.time.Duration maxTotalRetriesDuration,
RedisProtocol protocol,
Cache cache)
Deprecated.
|
|
UnifiedJedis(CommandExecutor executor)
The constructor to use a custom
CommandExecutor. |
|
UnifiedJedis(CommandExecutor executor,
ConnectionProvider provider,
CommandObjects commandObjects) |
|
UnifiedJedis(Connection connection)
The constructor to directly use a
Connection. |
|
UnifiedJedis(ConnectionProvider provider) |
|
UnifiedJedis(ConnectionProvider provider,
int maxAttempts,
java.time.Duration maxTotalRetriesDuration) |
protected |
UnifiedJedis(ConnectionProvider provider,
RedisProtocol protocol) |
protected |
UnifiedJedis(ConnectionProvider provider,
RedisProtocol protocol,
Cache cache) |
|
UnifiedJedis(HostAndPort hostAndPort) |
|
UnifiedJedis(HostAndPort hostAndPort,
JedisClientConfig clientConfig) |
|
UnifiedJedis(HostAndPort hostAndPort,
JedisClientConfig clientConfig,
Cache cache) |
|
UnifiedJedis(HostAndPort hostAndPort,
JedisClientConfig clientConfig,
CacheConfig cacheConfig) |
|
UnifiedJedis(JedisSocketFactory socketFactory)
The constructor to directly use a custom
JedisSocketFactory. |
|
UnifiedJedis(JedisSocketFactory socketFactory,
JedisClientConfig clientConfig)
The constructor to directly use a custom
JedisSocketFactory. |
|
UnifiedJedis(java.lang.String url) |
|
UnifiedJedis(java.net.URI uri) |
|
UnifiedJedis(java.net.URI uri,
JedisClientConfig config)
Create a new UnifiedJedis with the provided URI and JedisClientConfig object.
|
| Modifier and Type | Method and Description |
|---|---|
long |
append(byte[] key,
byte[] value) |
long |
append(java.lang.String key,
java.lang.String value)
Append Command
If the key already exists and is a string, this command appends the provided value at the end
of the string.
|
boolean |
bfAdd(java.lang.String key,
java.lang.String item)
BF.ADD {key} {item} |
long |
bfCard(java.lang.String key) |
boolean |
bfExists(java.lang.String key,
java.lang.String item)
BF.EXISTS {key} {item} |
java.util.Map<java.lang.String,java.lang.Object> |
bfInfo(java.lang.String key) |
java.util.List<java.lang.Boolean> |
bfInsert(java.lang.String key,
BFInsertParams insertParams,
java.lang.String... items)
BF.INSERT {key} [CAPACITY {cap}] [ERROR {error}] [EXPANSION {expansion}] [NOCREATE]
[NONSCALING] ITEMS {item ...} |
java.util.List<java.lang.Boolean> |
bfInsert(java.lang.String key,
java.lang.String... items)
BF.INSERT {key} ITEMS {item ...} |
java.lang.String |
bfLoadChunk(java.lang.String key,
long iterator,
byte[] data)
BF.LOADCHUNK {key} {iterator} {data} |
java.util.List<java.lang.Boolean> |
bfMAdd(java.lang.String key,
java.lang.String... items)
BF.MADD {key} {item ...} |
java.util.List<java.lang.Boolean> |
bfMExists(java.lang.String key,
java.lang.String... items)
BF.MEXISTS {key} {item ...} |
java.lang.String |
bfReserve(java.lang.String key,
double errorRate,
long capacity)
BF.RESERVE {key} {error_rate} {capacity} |
java.lang.String |
bfReserve(java.lang.String key,
double errorRate,
long capacity,
BFReserveParams reserveParams)
BF.RESERVE {key} {error_rate} {capacity} [EXPANSION {expansion}] [NONSCALING] |
java.util.Map.Entry<java.lang.Long,byte[]> |
bfScanDump(java.lang.String key,
long iterator)
BF.SCANDUMP {key} {iterator} |
long |
bitcount(byte[] key) |
long |
bitcount(byte[] key,
long start,
long end) |
long |
bitcount(byte[] key,
long start,
long end,
BitCountOption option) |
long |
bitcount(java.lang.String key)
Bitcount Command
Count the number of set bits (population counting) in a string.
|
long |
bitcount(java.lang.String key,
long start,
long end)
Bitcount Command
Count the number of set bits (population counting) in a string only in an interval start and end.
|
long |
bitcount(java.lang.String key,
long start,
long end,
BitCountOption option) |
java.util.List<java.lang.Long> |
bitfield(byte[] key,
byte[]... arguments) |
java.util.List<java.lang.Long> |
bitfield(java.lang.String key,
java.lang.String... arguments)
Bitfield Command
The command treats a Redis string as an array of bits, and is capable of addressing specific integer
fields of varying bit widths and arbitrary non (necessary) aligned offset.
|
java.util.List<java.lang.Long> |
bitfieldReadonly(byte[] key,
byte[]... arguments) |
java.util.List<java.lang.Long> |
bitfieldReadonly(java.lang.String key,
java.lang.String... arguments)
The readonly version of {@link StringCommands#bitfield(String, String...)
|
long |
bitop(BitOP op,
byte[] destKey,
byte[]... srcKeys)
Bitop Command Perform a bitwise operation
between multiple keys and store the result in the destKey.
|
long |
bitop(BitOP op,
java.lang.String destKey,
java.lang.String... srcKeys)
Bitop Command
Perform a bitwise operation between multiple keys (containing string values) and store the result in the destKey.
|
long |
bitpos(byte[] key,
boolean value) |
long |
bitpos(byte[] key,
boolean value,
BitPosParams params) |
long |
bitpos(java.lang.String key,
boolean value)
Bitpos Command
Return the position of the first bit set to 1 or 0 in a string.
|
long |
bitpos(java.lang.String key,
boolean value,
BitPosParams params)
Bitpos Command
Return the position of the first bit set to 1 or 0 in a string.
|
byte[] |
blmove(byte[] srcKey,
byte[] dstKey,
ListDirection from,
ListDirection to,
double timeout) |
java.lang.String |
blmove(java.lang.String srcKey,
java.lang.String dstKey,
ListDirection from,
ListDirection to,
double timeout)
Pop an element from a list, push it to another list and return it; or block until one is available
|
KeyValue<byte[],java.util.List<byte[]>> |
blmpop(double timeout,
ListDirection direction,
byte[]... keys) |
KeyValue<byte[],java.util.List<byte[]>> |
blmpop(double timeout,
ListDirection direction,
int count,
byte[]... keys) |
KeyValue<java.lang.String,java.util.List<java.lang.String>> |
blmpop(double timeout,
ListDirection direction,
int count,
java.lang.String... keys) |
KeyValue<java.lang.String,java.util.List<java.lang.String>> |
blmpop(double timeout,
ListDirection direction,
java.lang.String... keys) |
KeyValue<byte[],byte[]> |
blpop(double timeout,
byte[]... keys) |
KeyValue<java.lang.String,java.lang.String> |
blpop(double timeout,
java.lang.String... keys)
The blocking version of
ListCommands.lpop(String) LPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. |
KeyValue<java.lang.String,java.lang.String> |
blpop(double timeout,
java.lang.String key) |
java.util.List<byte[]> |
blpop(int timeout,
byte[]... keys) |
java.util.List<java.lang.String> |
blpop(int timeout,
java.lang.String... keys)
The blocking version of
ListCommands.lpop(String) LPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. |
java.util.List<java.lang.String> |
blpop(int timeout,
java.lang.String key) |
<T> T |
broadcastCommand(CommandObject<T> commandObject) |
KeyValue<byte[],byte[]> |
brpop(double timeout,
byte[]... keys) |
KeyValue<java.lang.String,java.lang.String> |
brpop(double timeout,
java.lang.String... keys)
The blocking version of
ListCommands.rpop(String) RPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. |
KeyValue<java.lang.String,java.lang.String> |
brpop(double timeout,
java.lang.String key) |
java.util.List<byte[]> |
brpop(int timeout,
byte[]... keys) |
java.util.List<java.lang.String> |
brpop(int timeout,
java.lang.String... keys)
The blocking version of
ListCommands.rpop(String) RPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. |
java.util.List<java.lang.String> |
brpop(int timeout,
java.lang.String key) |
byte[] |
brpoplpush(byte[] source,
byte[] destination,
int timeout) |
java.lang.String |
brpoplpush(java.lang.String source,
java.lang.String destination,
int timeout)
The blocking variant of
ListCommands.rpoplpush(String, String). |
KeyValue<byte[],java.util.List<Tuple>> |
bzmpop(double timeout,
SortedSetOption option,
byte[]... keys) |
KeyValue<byte[],java.util.List<Tuple>> |
bzmpop(double timeout,
SortedSetOption option,
int count,
byte[]... keys) |
KeyValue<java.lang.String,java.util.List<Tuple>> |
bzmpop(double timeout,
SortedSetOption option,
int count,
java.lang.String... keys) |
KeyValue<java.lang.String,java.util.List<Tuple>> |
bzmpop(double timeout,
SortedSetOption option,
java.lang.String... keys) |
KeyValue<byte[],Tuple> |
bzpopmax(double timeout,
byte[]... keys) |
KeyValue<java.lang.String,Tuple> |
bzpopmax(double timeout,
java.lang.String... keys)
The blocking version of
ZPOPMAX |
KeyValue<byte[],Tuple> |
bzpopmin(double timeout,
byte[]... keys) |
KeyValue<java.lang.String,Tuple> |
bzpopmin(double timeout,
java.lang.String... keys)
The blocking version of
ZPOPMIN |
boolean |
cfAdd(java.lang.String key,
java.lang.String item)
CF.ADD Adds an item to the cuckoo filter, creating the filter if it does not
exist
|
boolean |
cfAddNx(java.lang.String key,
java.lang.String item)
CF.ADDNX Adds an item to the cuckoo filter, only if it does not exist yet
|
long |
cfCount(java.lang.String key,
java.lang.String item)
CF.COUNT Returns the number of times an item may be in the filter.
|
boolean |
cfDel(java.lang.String key,
java.lang.String item)
CF.DEL Deletes an item once from the filter.
|
boolean |
cfExists(java.lang.String key,
java.lang.String item)
CF.EXISTS Check if an item exists in a Cuckoo Filter
|
java.util.Map<java.lang.String,java.lang.Object> |
cfInfo(java.lang.String key)
CF.INFO Return information about filter
|
java.util.List<java.lang.Boolean> |
cfInsert(java.lang.String key,
CFInsertParams insertParams,
java.lang.String... items)
CF.INSERT Adds one or more items to a cuckoo filter, using the passed
options
|
java.util.List<java.lang.Boolean> |
cfInsert(java.lang.String key,
java.lang.String... items)
CF.INSERT Adds one or more items to a cuckoo filter, creating it if it does
not exist yet.
|
java.util.List<java.lang.Boolean> |
cfInsertNx(java.lang.String key,
CFInsertParams insertParams,
java.lang.String... items)
CF.INSERTNX Adds one or more items to a cuckoo filter, using the passed
options
|
java.util.List<java.lang.Boolean> |
cfInsertNx(java.lang.String key,
java.lang.String... items)
CF.INSERTNX Adds one or more items to a cuckoo filter, only if it does not
exist yet
|
java.lang.String |
cfLoadChunk(java.lang.String key,
long iterator,
byte[] data)
CF.LOADCHUNK Restores a filter previously saved using SCANDUMP.
|
java.util.List<java.lang.Boolean> |
cfMExists(java.lang.String key,
java.lang.String... items)
CF.MEXISTS {key} {item ...} |
java.lang.String |
cfReserve(java.lang.String key,
long capacity)
CF.RESERVE Creates a Cuckoo Filter under key with the given parameters
|
java.lang.String |
cfReserve(java.lang.String key,
long capacity,
CFReserveParams reserveParams)
CF.RESERVE Creates a Cuckoo Filter under key with the given parameters
|
java.util.Map.Entry<java.lang.Long,byte[]> |
cfScanDump(java.lang.String key,
long iterator)
CF.SCANDUMP Begins an incremental save of the cuckoo filter.
|
void |
close() |
java.util.List<java.lang.Long> |
cmsIncrBy(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Long> itemIncrements)
CMS.INCRBY Increases the count of one or more item.
|
java.util.Map<java.lang.String,java.lang.Object> |
cmsInfo(java.lang.String key)
CMS.INFO Returns width, depth and total count of the sketch.
|
java.lang.String |
cmsInitByDim(java.lang.String key,
long width,
long depth)
CMS.INITBYDIM Initializes a Count-Min Sketch to dimensions specified by user.
|
java.lang.String |
cmsInitByProb(java.lang.String key,
double error,
double probability)
CMS.INITBYPROB Initializes a Count-Min Sketch to accommodate requested
capacity.
|
java.lang.String |
cmsMerge(java.lang.String destKey,
java.util.Map<java.lang.String,java.lang.Long> keysAndWeights)
CMS.MERGE Merges several sketches into one sketch.
|
java.lang.String |
cmsMerge(java.lang.String destKey,
java.lang.String... keys)
CMS.MERGE Merges several sketches into one sketch.
|
java.util.List<java.lang.Long> |
cmsQuery(java.lang.String key,
java.lang.String... items)
CMS.QUERY Returns count for item.
|
java.lang.String |
configSet(java.lang.String parameter,
java.lang.String value) |
boolean |
copy(byte[] srcKey,
byte[] dstKey,
boolean replace) |
boolean |
copy(java.lang.String srcKey,
java.lang.String dstKey,
boolean replace)
Copy Command
Copy the value stored at the source key to the destination key.
|
long |
dbSize() |
long |
decr(byte[] key) |
long |
decr(java.lang.String key)
Decr Command
Decrement the number stored at key by one.
|
long |
decrBy(byte[] key,
long decrement) |
long |
decrBy(java.lang.String key,
long decrement)
DecrBy Command
DECRBY work just like
DECR but instead to decrement by 1 the
decrement is integer. |
long |
del(byte[]... keys) |
long |
del(byte[] key) |
long |
del(java.lang.String... keys)
Remove the specified keys.
|
long |
del(java.lang.String key)
Del Command
Remove the specified key.
|
byte[] |
dump(byte[] key) |
byte[] |
dump(java.lang.String key)
Dump Command
Serialize the value stored at key in a Redis-specific format and return it to the user.
|
java.lang.String |
echo(java.lang.String string) |
java.lang.Object |
eval(byte[] script) |
java.lang.Object |
eval(byte[] script,
byte[] sampleKey) |
java.lang.Object |
eval(byte[] script,
int keyCount,
byte[]... params) |
java.lang.Object |
eval(byte[] script,
java.util.List<byte[]> keys,
java.util.List<byte[]> args) |
java.lang.Object |
eval(java.lang.String script)
Eval Command
Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
|
java.lang.Object |
eval(java.lang.String script,
int keyCount,
java.lang.String... params)
Eval Command
Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
|
java.lang.Object |
eval(java.lang.String script,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
Eval Command
Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
|
java.lang.Object |
eval(java.lang.String script,
java.lang.String sampleKey) |
java.lang.Object |
evalReadonly(byte[] script,
java.util.List<byte[]> keys,
java.util.List<byte[]> args) |
java.lang.Object |
evalReadonly(java.lang.String script,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
Readonly version of
EVAL |
java.lang.Object |
evalsha(byte[] sha1) |
java.lang.Object |
evalsha(byte[] sha1,
byte[] sampleKey) |
java.lang.Object |
evalsha(byte[] sha1,
int keyCount,
byte[]... params) |
java.lang.Object |
evalsha(byte[] sha1,
java.util.List<byte[]> keys,
java.util.List<byte[]> args) |
java.lang.Object |
evalsha(java.lang.String sha1)
EvalSha Command
Similar to
EVAL, but the script cached on the server
side by its SHA1 digest. |
java.lang.Object |
evalsha(java.lang.String sha1,
int keyCount,
java.lang.String... params)
|
java.lang.Object |
evalsha(java.lang.String sha1,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
EvalSha Command
Similar to
ScriptingKeyCommands.eval(String, List, List) EVAL}, but the script cached on the server
side by its SHA1 digest. |
java.lang.Object |
evalsha(java.lang.String sha1,
java.lang.String sampleKey) |
java.lang.Object |
evalshaReadonly(byte[] sha1,
java.util.List<byte[]> keys,
java.util.List<byte[]> args) |
java.lang.Object |
evalshaReadonly(java.lang.String sha1,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
Readonly version of
EVAL |
java.lang.Object |
executeCommand(CommandArguments args) |
<T> T |
executeCommand(CommandObject<T> commandObject) |
long |
exists(byte[]... keys) |
boolean |
exists(byte[] key) |
long |
exists(java.lang.String... keys)
Exists Command
Test if the specified keys exist.
|
boolean |
exists(java.lang.String key)
Exists Command
Test if the specified key exist.
|
long |
expire(byte[] key,
long seconds) |
long |
expire(byte[] key,
long seconds,
ExpiryOption expiryOption) |
long |
expire(java.lang.String key,
long seconds)
Expire Command
Set a timeout on the specified key.
|
long |
expire(java.lang.String key,
long seconds,
ExpiryOption expiryOption)
Similar to
EXPIRE but with optional expiry setting. |
long |
expireAt(byte[] key,
long unixTime) |
long |
expireAt(byte[] key,
long unixTime,
ExpiryOption expiryOption) |
long |
expireAt(java.lang.String key,
long unixTime)
ExpireAt Command
EXPIREAT works exactly like
EXPIRE but instead to get the
number of seconds representing the Time To Live of the key as a second argument (that is a
relative way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp
(Number of seconds elapsed since 1 Gen 1970). |
long |
expireAt(java.lang.String key,
long unixTime,
ExpiryOption expiryOption)
|
long |
expireTime(byte[] key) |
long |
expireTime(java.lang.String key)
ExpireTime Command
Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire.
|
java.lang.Object |
fcall(byte[] name,
java.util.List<byte[]> keys,
java.util.List<byte[]> args)
Invoke a function.
|
java.lang.Object |
fcall(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
Invoke a function.
|
java.lang.Object |
fcallReadonly(byte[] name,
java.util.List<byte[]> keys,
java.util.List<byte[]> args) |
java.lang.Object |
fcallReadonly(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
This is a read-only variant of the
FCALL
command that cannot execute commands that modify data. |
java.lang.String |
flushAll() |
java.lang.String |
flushDB() |
AggregationResult |
ftAggregate(java.lang.String indexName,
AggregationBuilder aggr) |
FtAggregateIteration |
ftAggregateIteration(java.lang.String indexName,
AggregationBuilder aggr)
CURSOR must be set. |
java.lang.String |
ftAliasAdd(java.lang.String aliasName,
java.lang.String indexName) |
java.lang.String |
ftAliasDel(java.lang.String aliasName) |
java.lang.String |
ftAliasUpdate(java.lang.String aliasName,
java.lang.String indexName) |
java.lang.String |
ftAlter(java.lang.String indexName,
java.lang.Iterable<SchemaField> schemaFields) |
java.lang.String |
ftAlter(java.lang.String indexName,
Schema schema) |
java.util.Map<java.lang.String,java.lang.Object> |
ftConfigGet(java.lang.String option)
Deprecated.
|
java.util.Map<java.lang.String,java.lang.Object> |
ftConfigGet(java.lang.String indexName,
java.lang.String option)
Deprecated.
|
java.lang.String |
ftConfigSet(java.lang.String option,
java.lang.String value)
Deprecated.
|
java.lang.String |
ftConfigSet(java.lang.String indexName,
java.lang.String option,
java.lang.String value)
Deprecated.
|
java.lang.String |
ftCreate(java.lang.String indexName,
FTCreateParams createParams,
java.lang.Iterable<SchemaField> schemaFields) |
java.lang.String |
ftCreate(java.lang.String indexName,
IndexOptions indexOptions,
Schema schema) |
java.lang.String |
ftCursorDel(java.lang.String indexName,
long cursorId) |
AggregationResult |
ftCursorRead(java.lang.String indexName,
long cursorId,
int count) |
long |
ftDictAdd(java.lang.String dictionary,
java.lang.String... terms) |
long |
ftDictAddBySampleKey(java.lang.String indexName,
java.lang.String dictionary,
java.lang.String... terms) |
long |
ftDictDel(java.lang.String dictionary,
java.lang.String... terms) |
long |
ftDictDelBySampleKey(java.lang.String indexName,
java.lang.String dictionary,
java.lang.String... terms) |
java.util.Set<java.lang.String> |
ftDictDump(java.lang.String dictionary) |
java.util.Set<java.lang.String> |
ftDictDumpBySampleKey(java.lang.String indexName,
java.lang.String dictionary) |
java.lang.String |
ftDropIndex(java.lang.String indexName) |
java.lang.String |
ftDropIndexDD(java.lang.String indexName) |
java.lang.String |
ftExplain(java.lang.String indexName,
Query query) |
java.util.List<java.lang.String> |
ftExplainCLI(java.lang.String indexName,
Query query) |
java.util.Map<java.lang.String,java.lang.Object> |
ftInfo(java.lang.String indexName) |
java.util.Set<java.lang.String> |
ftList() |
java.util.Map.Entry<AggregationResult,ProfilingInfo> |
ftProfileAggregate(java.lang.String indexName,
FTProfileParams profileParams,
AggregationBuilder aggr) |
java.util.Map.Entry<SearchResult,ProfilingInfo> |
ftProfileSearch(java.lang.String indexName,
FTProfileParams profileParams,
Query query) |
java.util.Map.Entry<SearchResult,ProfilingInfo> |
ftProfileSearch(java.lang.String indexName,
FTProfileParams profileParams,
java.lang.String query,
FTSearchParams searchParams) |
SearchResult |
ftSearch(byte[] indexName,
Query query)
Deprecated.
|
SearchResult |
ftSearch(java.lang.String indexName,
Query query) |
SearchResult |
ftSearch(java.lang.String indexName,
java.lang.String query) |
SearchResult |
ftSearch(java.lang.String indexName,
java.lang.String query,
FTSearchParams params) |
FtSearchIteration |
ftSearchIteration(int batchSize,
java.lang.String indexName,
Query query)
Query.limit(java.lang.Integer, java.lang.Integer) will be ignored. |
FtSearchIteration |
ftSearchIteration(int batchSize,
java.lang.String indexName,
java.lang.String query,
FTSearchParams params)
FTSearchParams.limit(int, int) will be ignored. |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> |
ftSpellCheck(java.lang.String index,
java.lang.String query) |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> |
ftSpellCheck(java.lang.String index,
java.lang.String query,
FTSpellCheckParams spellCheckParams) |
long |
ftSugAdd(java.lang.String key,
java.lang.String string,
double score) |
long |
ftSugAddIncr(java.lang.String key,
java.lang.String string,
double score) |
boolean |
ftSugDel(java.lang.String key,
java.lang.String string) |
java.util.List<java.lang.String> |
ftSugGet(java.lang.String key,
java.lang.String prefix) |
java.util.List<java.lang.String> |
ftSugGet(java.lang.String key,
java.lang.String prefix,
boolean fuzzy,
int max) |
java.util.List<Tuple> |
ftSugGetWithScores(java.lang.String key,
java.lang.String prefix) |
java.util.List<Tuple> |
ftSugGetWithScores(java.lang.String key,
java.lang.String prefix,
boolean fuzzy,
int max) |
long |
ftSugLen(java.lang.String key) |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
ftSynDump(java.lang.String indexName) |
java.lang.String |
ftSynUpdate(java.lang.String indexName,
java.lang.String synonymGroupId,
java.lang.String... terms) |
java.util.Set<java.lang.String> |
ftTagVals(java.lang.String indexName,
java.lang.String fieldName) |
java.lang.String |
functionDelete(byte[] libraryName)
This command deletes the library called library-name and all functions in it.
|
java.lang.String |
functionDelete(java.lang.String libraryName)
This command deletes the library called library-name and all functions in it.
|
byte[] |
functionDump()
Return the serialized payload of loaded libraries.
|
java.lang.String |
functionFlush()
Deletes all the libraries, unless called with the optional mode argument, the
'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.
|
java.lang.String |
functionFlush(FlushMode mode)
Deletes all the libraries, unless called with the optional mode argument, the
'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.
|
java.lang.String |
functionKill()
Kill a function that is currently executing.
|
java.util.List<LibraryInfo> |
functionList()
Return information about the functions and libraries.
|
java.util.List<java.lang.Object> |
functionList(byte[] libraryNamePattern)
Return information about the functions and libraries.
|
java.util.List<LibraryInfo> |
functionList(java.lang.String libraryNamePattern)
Return information about the functions and libraries.
|
java.util.List<java.lang.Object> |
functionListBinary()
Return information about the functions and libraries.
|
java.util.List<LibraryInfo> |
functionListWithCode()
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
java.util.List<java.lang.Object> |
functionListWithCode(byte[] libraryNamePattern)
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
java.util.List<LibraryInfo> |
functionListWithCode(java.lang.String libraryNamePattern)
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
java.util.List<java.lang.Object> |
functionListWithCodeBinary()
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
java.lang.String |
functionLoad(byte[] functionCode)
Load a library to Redis.
|
java.lang.String |
functionLoad(java.lang.String functionCode)
Load a library to Redis.
|
java.lang.String |
functionLoadReplace(byte[] functionCode)
Load a library to Redis.
|
java.lang.String |
functionLoadReplace(java.lang.String functionCode)
Load a library to Redis.
|
java.lang.String |
functionRestore(byte[] serializedValue)
Restore libraries from the serialized payload.
|
java.lang.String |
functionRestore(byte[] serializedValue,
FunctionRestorePolicy policy)
Restore libraries from the serialized payload.
|
FunctionStats |
functionStats()
Return information about the function that's currently running and information
about the available execution engines.
|
java.lang.Object |
functionStatsBinary()
Return information about the function that's currently running and information
about the available execution engines.
|
long |
geoadd(byte[] key,
double longitude,
double latitude,
byte[] member) |
long |
geoadd(byte[] key,
GeoAddParams params,
java.util.Map<byte[],GeoCoordinate> memberCoordinateMap) |
long |
geoadd(byte[] key,
java.util.Map<byte[],GeoCoordinate> memberCoordinateMap) |
long |
geoadd(java.lang.String key,
double longitude,
double latitude,
java.lang.String member)
Adds the specified geospatial item (longitude, latitude, member) to the specified key.
|
long |
geoadd(java.lang.String key,
GeoAddParams params,
java.util.Map<java.lang.String,GeoCoordinate> memberCoordinateMap)
Adds the specified geospatial items (in memberCoordinateMap) to the specified key.
|
long |
geoadd(java.lang.String key,
java.util.Map<java.lang.String,GeoCoordinate> memberCoordinateMap)
Adds the specified geospatial items (in memberCoordinateMap) to the specified key.
|
java.lang.Double |
geodist(byte[] key,
byte[] member1,
byte[] member2) |
java.lang.Double |
geodist(byte[] key,
byte[] member1,
byte[] member2,
GeoUnit unit) |
java.lang.Double |
geodist(java.lang.String key,
java.lang.String member1,
java.lang.String member2)
Return the distance between two members in the geospatial index represented by the sorted set.
|
java.lang.Double |
geodist(java.lang.String key,
java.lang.String member1,
java.lang.String member2,
GeoUnit unit)
Return the distance between two members in the geospatial index represented by the sorted set.
|
java.util.List<byte[]> |
geohash(byte[] key,
byte[]... members) |
java.util.List<java.lang.String> |
geohash(java.lang.String key,
java.lang.String... members)
Return valid Geohash strings representing the position of the given members.
|
java.util.List<GeoCoordinate> |
geopos(byte[] key,
byte[]... members) |
java.util.List<GeoCoordinate> |
geopos(java.lang.String key,
java.lang.String... members)
Return the positions (longitude,latitude) of all the specified members.
|
java.util.List<GeoRadiusResponse> |
georadius(byte[] key,
double longitude,
double latitude,
double radius,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
georadius(byte[] key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param) |
java.util.List<GeoRadiusResponse> |
georadius(java.lang.String key,
double longitude,
double latitude,
double radius,
GeoUnit unit)
Return the members of a sorted set populated with geospatial information using GEOADD,
which are within the borders of the area specified with the center location and the radius.
|
java.util.List<GeoRadiusResponse> |
georadius(java.lang.String key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param)
Return the members of a sorted set populated with geospatial information using GEOADD,
which are within the borders of the area specified with the center location and the radius.
|
java.util.List<GeoRadiusResponse> |
georadiusByMember(byte[] key,
byte[] member,
double radius,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
georadiusByMember(byte[] key,
byte[] member,
double radius,
GeoUnit unit,
GeoRadiusParam param) |
java.util.List<GeoRadiusResponse> |
georadiusByMember(java.lang.String key,
java.lang.String member,
double radius,
GeoUnit unit)
This command is exactly like
GEORADIUS
with the sole difference that instead of taking, as the center of the area to query, a longitude
and latitude value, it takes the name of a member already existing inside the geospatial index
represented by the sorted set. |
java.util.List<GeoRadiusResponse> |
georadiusByMember(java.lang.String key,
java.lang.String member,
double radius,
GeoUnit unit,
GeoRadiusParam param)
This command is exactly like
GEORADIUS
with the sole difference that instead of taking, as the center of the area to query, a longitude
and latitude value, it takes the name of a member already existing inside the geospatial index
represented by the sorted set. |
java.util.List<GeoRadiusResponse> |
georadiusByMemberReadonly(byte[] key,
byte[] member,
double radius,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
georadiusByMemberReadonly(byte[] key,
byte[] member,
double radius,
GeoUnit unit,
GeoRadiusParam param) |
java.util.List<GeoRadiusResponse> |
georadiusByMemberReadonly(java.lang.String key,
java.lang.String member,
double radius,
GeoUnit unit)
Readonly version of
GEORADIUSBYMEMBER
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of
the circular area delimited by center and radius and M is the number of items inside the index. |
java.util.List<GeoRadiusResponse> |
georadiusByMemberReadonly(java.lang.String key,
java.lang.String member,
double radius,
GeoUnit unit,
GeoRadiusParam param)
Readonly version of
GEORADIUSBYMEMBER
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of
the circular area delimited by center and radius and M is the number of items inside the index. |
long |
georadiusByMemberStore(byte[] key,
byte[] member,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam) |
long |
georadiusByMemberStore(java.lang.String key,
java.lang.String member,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam)
This command is exactly like
GEORADIUSBYMEMBER
but storing the results at the destination key (provided with storeParam). |
java.util.List<GeoRadiusResponse> |
georadiusReadonly(byte[] key,
double longitude,
double latitude,
double radius,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
georadiusReadonly(byte[] key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param) |
java.util.List<GeoRadiusResponse> |
georadiusReadonly(java.lang.String key,
double longitude,
double latitude,
double radius,
GeoUnit unit)
Readonly version of
GEORADIUS,
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of
the circular area delimited by center and radius and M is the number of items inside the index. |
java.util.List<GeoRadiusResponse> |
georadiusReadonly(java.lang.String key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param)
Readonly version of
GEORADIUS,
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of
the circular area delimited by center and radius and M is the number of items inside the index. |
long |
georadiusStore(byte[] key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam) |
long |
georadiusStore(java.lang.String key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam)
This command is exactly like
GEORADIUS
but storing the results at the destination key (provided with storeParam). |
java.util.List<GeoRadiusResponse> |
geosearch(byte[] key,
byte[] member,
double width,
double height,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
geosearch(byte[] key,
byte[] member,
double radius,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
geosearch(byte[] key,
GeoCoordinate coord,
double width,
double height,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
geosearch(byte[] key,
GeoCoordinate coord,
double radius,
GeoUnit unit) |
java.util.List<GeoRadiusResponse> |
geosearch(byte[] key,
GeoSearchParam params) |
java.util.List<GeoRadiusResponse> |
geosearch(java.lang.String key,
GeoCoordinate coord,
double width,
double height,
GeoUnit unit)
Return the members of a sorted set populated with geospatial information using GEOADD,
which are within the borders of the area specified by a given shape.
|
java.util.List<GeoRadiusResponse> |
geosearch(java.lang.String key,
GeoCoordinate coord,
double radius,
GeoUnit unit)
Return the members of a sorted set populated with geospatial information using GEOADD,
which are within the borders of the area specified by a given shape.
|
java.util.List<GeoRadiusResponse> |
geosearch(java.lang.String key,
GeoSearchParam params)
Return the members of a sorted set populated with geospatial information using GEOADD,
which are within the borders of the area specified by a given shape.
|
java.util.List<GeoRadiusResponse> |
geosearch(java.lang.String key,
java.lang.String member,
double width,
double height,
GeoUnit unit)
Return the members of a sorted set populated with geospatial information using GEOADD,
which are within the borders of the area specified by a given shape.
|
java.util.List<GeoRadiusResponse> |
geosearch(java.lang.String key,
java.lang.String member,
double radius,
GeoUnit unit)
Return the members of a sorted set populated with geospatial information using GEOADD,
which are within the borders of the area specified by a given shape.
|
long |
geosearchStore(byte[] dest,
byte[] src,
byte[] member,
double width,
double height,
GeoUnit unit) |
long |
geosearchStore(byte[] dest,
byte[] src,
byte[] member,
double radius,
GeoUnit unit) |
long |
geosearchStore(byte[] dest,
byte[] src,
GeoCoordinate coord,
double width,
double height,
GeoUnit unit) |
long |
geosearchStore(byte[] dest,
byte[] src,
GeoCoordinate coord,
double radius,
GeoUnit unit) |
long |
geosearchStore(byte[] dest,
byte[] src,
GeoSearchParam params) |
long |
geosearchStore(java.lang.String dest,
java.lang.String src,
GeoCoordinate coord,
double width,
double height,
GeoUnit unit)
This command is exactly like
GEOSEARCH
but storing the results at dest. |
long |
geosearchStore(java.lang.String dest,
java.lang.String src,
GeoCoordinate coord,
double radius,
GeoUnit unit)
This command is exactly like
GEOSEARCH
but storing the results at dest. |
long |
geosearchStore(java.lang.String dest,
java.lang.String src,
GeoSearchParam params)
This command is exactly like
GEOSEARCH
but storing the results at dest. |
long |
geosearchStore(java.lang.String dest,
java.lang.String src,
java.lang.String member,
double width,
double height,
GeoUnit unit)
This command is exactly like
GEOSEARCH
but storing the results at dest. |
long |
geosearchStore(java.lang.String dest,
java.lang.String src,
java.lang.String member,
double radius,
GeoUnit unit)
This command is exactly like
GEOSEARCH
but storing the results at dest. |
long |
geosearchStoreStoreDist(byte[] dest,
byte[] src,
GeoSearchParam params) |
long |
geosearchStoreStoreDist(java.lang.String dest,
java.lang.String src,
GeoSearchParam params)
This command is exactly like
GEOSEARCHSTORE
but storing the results with their destinations from the center point. |
byte[] |
get(byte[] key) |
java.lang.String |
get(java.lang.String key)
Get Command
Get the value of the specified key.
|
boolean |
getbit(byte[] key,
long offset) |
boolean |
getbit(java.lang.String key,
long offset)
GetBit Command
Returns the bit value at offset in the string value stored at key.
|
Cache |
getCache() |
byte[] |
getDel(byte[] key) |
java.lang.String |
getDel(java.lang.String key)
GetDel Command
Get the value of key and delete the key.
|
byte[] |
getEx(byte[] key,
GetExParams params) |
java.lang.String |
getEx(java.lang.String key,
GetExParams params)
GetEx Command
Get the value of key and optionally set its expiration.
|
byte[] |
getrange(byte[] key,
long startOffset,
long endOffset) |
java.lang.String |
getrange(java.lang.String key,
long startOffset,
long endOffset)
GetRange Command
Return the substring of the string value stored at key, determined by the offsets start
and end (both are inclusive).
|
byte[] |
getSet(byte[] key,
byte[] value)
Deprecated.
|
java.lang.String |
getSet(java.lang.String key,
java.lang.String value)
Deprecated.
|
long |
hdel(byte[] key,
byte[]... field) |
long |
hdel(java.lang.String key,
java.lang.String... field) |
boolean |
hexists(byte[] key,
byte[] field) |
boolean |
hexists(java.lang.String key,
java.lang.String field) |
java.util.List<java.lang.Long> |
hexpire(byte[] key,
long seconds,
byte[]... fields)
Set expiry for hash field using relative time to expire (seconds).
|
java.util.List<java.lang.Long> |
hexpire(byte[] key,
long seconds,
ExpiryOption condition,
byte[]... fields)
Set expiry for hash field using relative time to expire (seconds).
|
java.util.List<java.lang.Long> |
hexpire(java.lang.String key,
long seconds,
ExpiryOption condition,
java.lang.String... fields)
Set expiry for hash field using relative time to expire (seconds).
|
java.util.List<java.lang.Long> |
hexpire(java.lang.String key,
long seconds,
java.lang.String... fields)
Set expiry for hash field using relative time to expire (seconds).
|
java.util.List<java.lang.Long> |
hexpireAt(byte[] key,
long unixTimeSeconds,
byte[]... fields)
Set expiry for hash field using an absolute Unix timestamp (seconds).
|
java.util.List<java.lang.Long> |
hexpireAt(byte[] key,
long unixTimeSeconds,
ExpiryOption condition,
byte[]... fields)
Set expiry for hash field using an absolute Unix timestamp (seconds).
|
java.util.List<java.lang.Long> |
hexpireAt(java.lang.String key,
long unixTimeSeconds,
ExpiryOption condition,
java.lang.String... fields)
Set expiry for hash field using an absolute Unix timestamp (seconds).
|
java.util.List<java.lang.Long> |
hexpireAt(java.lang.String key,
long unixTimeSeconds,
java.lang.String... fields)
Set expiry for hash field using an absolute Unix timestamp (seconds).
|
java.util.List<java.lang.Long> |
hexpireTime(byte[] key,
byte[]... fields)
Returns the expiration time of a hash field as a Unix timestamp, in seconds.
|
java.util.List<java.lang.Long> |
hexpireTime(java.lang.String key,
java.lang.String... fields)
Returns the expiration time of a hash field as a Unix timestamp, in seconds.
|
byte[] |
hget(byte[] key,
byte[] field) |
java.lang.String |
hget(java.lang.String key,
java.lang.String field) |
java.util.Map<byte[],byte[]> |
hgetAll(byte[] key) |
java.util.Map<java.lang.String,java.lang.String> |
hgetAll(java.lang.String key) |
java.util.List<byte[]> |
hgetdel(byte[] key,
byte[]... fields)
Retrieves the values associated with the specified fields in the hash stored at the given key
and then deletes those fields from the hash.
|
java.util.List<java.lang.String> |
hgetdel(java.lang.String key,
java.lang.String... fields)
Retrieves the values associated with the specified fields in the hash stored at the given key
and then deletes those fields from the hash.
|
java.util.List<byte[]> |
hgetex(byte[] key,
HGetExParams params,
byte[]... fields)
Retrieves the values associated with the specified fields in a hash stored at the given key
and optionally sets their expiration.
|
java.util.List<java.lang.String> |
hgetex(java.lang.String key,
HGetExParams params,
java.lang.String... fields)
Retrieves the values associated with the specified fields in a hash stored at the given key
and optionally sets their expiration.
|
long |
hincrBy(byte[] key,
byte[] field,
long value) |
long |
hincrBy(java.lang.String key,
java.lang.String field,
long value) |
double |
hincrByFloat(byte[] key,
byte[] field,
double value) |
double |
hincrByFloat(java.lang.String key,
java.lang.String field,
double value) |
java.util.Set<byte[]> |
hkeys(byte[] key) |
java.util.Set<java.lang.String> |
hkeys(java.lang.String key) |
long |
hlen(byte[] key) |
long |
hlen(java.lang.String key) |
java.util.List<byte[]> |
hmget(byte[] key,
byte[]... fields) |
java.util.List<java.lang.String> |
hmget(java.lang.String key,
java.lang.String... fields) |
java.lang.String |
hmset(byte[] key,
java.util.Map<byte[],byte[]> hash) |
java.lang.String |
hmset(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> hash) |
java.util.List<java.lang.Long> |
hpersist(byte[] key,
byte[]... fields)
Removes the expiration time for each specified field.
|
java.util.List<java.lang.Long> |
hpersist(java.lang.String key,
java.lang.String... fields)
Removes the expiration time for each specified field.
|
java.util.List<java.lang.Long> |
hpexpire(byte[] key,
long milliseconds,
byte[]... fields)
Set expiry for hash field using relative time to expire (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpire(byte[] key,
long milliseconds,
ExpiryOption condition,
byte[]... fields)
Set expiry for hash field using relative time to expire (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpire(java.lang.String key,
long milliseconds,
ExpiryOption condition,
java.lang.String... fields)
Set expiry for hash field using relative time to expire (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpire(java.lang.String key,
long milliseconds,
java.lang.String... fields)
Set expiry for hash field using relative time to expire (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpireAt(byte[] key,
long unixTimeMillis,
byte[]... fields)
Set expiry for hash field using an absolute Unix timestamp (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpireAt(byte[] key,
long unixTimeMillis,
ExpiryOption condition,
byte[]... fields)
Set expiry for hash field using an absolute Unix timestamp (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpireAt(java.lang.String key,
long unixTimeMillis,
ExpiryOption condition,
java.lang.String... fields)
Set expiry for hash field using an absolute Unix timestamp (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpireAt(java.lang.String key,
long unixTimeMillis,
java.lang.String... fields)
Set expiry for hash field using an absolute Unix timestamp (milliseconds).
|
java.util.List<java.lang.Long> |
hpexpireTime(byte[] key,
byte[]... fields)
Returns the expiration time of a hash field as a Unix timestamp, in milliseconds.
|
java.util.List<java.lang.Long> |
hpexpireTime(java.lang.String key,
java.lang.String... fields)
Returns the expiration time of a hash field as a Unix timestamp, in milliseconds.
|
java.util.List<java.lang.Long> |
hpttl(byte[] key,
byte[]... fields)
Returns the TTL in milliseconds of a hash field.
|
java.util.List<java.lang.Long> |
hpttl(java.lang.String key,
java.lang.String... fields)
Returns the TTL in milliseconds of a hash field.
|
byte[] |
hrandfield(byte[] key) |
java.util.List<byte[]> |
hrandfield(byte[] key,
long count) |
java.lang.String |
hrandfield(java.lang.String key) |
java.util.List<java.lang.String> |
hrandfield(java.lang.String key,
long count) |
java.util.List<java.util.Map.Entry<byte[],byte[]>> |
hrandfieldWithValues(byte[] key,
long count) |
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> |
hrandfieldWithValues(java.lang.String key,
long count) |
ScanResult<java.util.Map.Entry<byte[],byte[]>> |
hscan(byte[] key,
byte[] cursor,
ScanParams params) |
ScanResult<java.util.Map.Entry<java.lang.String,java.lang.String>> |
hscan(java.lang.String key,
java.lang.String cursor,
ScanParams params) |
ScanResult<byte[]> |
hscanNoValues(byte[] key,
byte[] cursor,
ScanParams params) |
ScanResult<java.lang.String> |
hscanNoValues(java.lang.String key,
java.lang.String cursor,
ScanParams params) |
long |
hset(byte[] key,
byte[] field,
byte[] value) |
long |
hset(byte[] key,
java.util.Map<byte[],byte[]> hash) |
long |
hset(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> hash) |
long |
hset(java.lang.String key,
java.lang.String field,
java.lang.String value) |
long |
hsetex(byte[] key,
HSetExParams params,
byte[] field,
byte[] value)
Sets the specified fields in the hash stored at key to the specified values with additional parameters,
and optionally set their expiration.
|
long |
hsetex(byte[] key,
HSetExParams params,
java.util.Map<byte[],byte[]> hash)
Sets the specified fields in the hash stored at key to the specified values with additional parameters,
and optionally set their expiration.
|
long |
hsetex(java.lang.String key,
HSetExParams params,
java.util.Map<java.lang.String,java.lang.String> hash)
Sets the specified fields in the hash stored at key to the specified values with additional parameters,
and optionally set their expiration.
|
long |
hsetex(java.lang.String key,
HSetExParams params,
java.lang.String field,
java.lang.String value)
Sets the specified fields in the hash stored at key to the specified values with additional parameters,
and optionally set their expiration.
|
long |
hsetnx(byte[] key,
byte[] field,
byte[] value) |
long |
hsetnx(java.lang.String key,
java.lang.String field,
java.lang.String value) |
long |
hsetObject(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Object> hash) |
long |
hsetObject(java.lang.String key,
java.lang.String field,
java.lang.Object value) |
long |
hstrlen(byte[] key,
byte[] field) |
long |
hstrlen(java.lang.String key,
java.lang.String field) |
java.util.List<java.lang.Long> |
httl(byte[] key,
byte[]... fields)
Returns the TTL in seconds of a hash field.
|
java.util.List<java.lang.Long> |
httl(java.lang.String key,
java.lang.String... fields)
Returns the TTL in seconds of a hash field.
|
java.util.List<byte[]> |
hvals(byte[] key) |
java.util.List<java.lang.String> |
hvals(java.lang.String key) |
long |
incr(byte[] key) |
long |
incr(java.lang.String key)
Incr Command
Increment the number stored at key by one.
|
long |
incrBy(byte[] key,
long increment) |
long |
incrBy(java.lang.String key,
long increment)
IncrBy Command
INCRBY work just like
INCR but instead to increment by 1 the
increment is integer. |
double |
incrByFloat(byte[] key,
double increment) |
double |
incrByFloat(java.lang.String key,
double increment)
IncrByFloat Command
INCRBYFLOAT work just like
StringCommands.incrBy(String, long) INCRBY} but increments by floats
instead of integers. |
java.lang.String |
info() |
java.lang.String |
info(java.lang.String section) |
java.util.List<java.lang.Long> |
jsonArrAppend(java.lang.String key,
Path2 path,
java.lang.Object... objects) |
java.lang.Long |
jsonArrAppend(java.lang.String key,
Path path,
java.lang.Object... pojos)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonArrAppendWithEscape(java.lang.String key,
Path2 path,
java.lang.Object... objects) |
java.util.List<java.lang.Long> |
jsonArrIndex(java.lang.String key,
Path2 path,
java.lang.Object scalar) |
long |
jsonArrIndex(java.lang.String key,
Path path,
java.lang.Object scalar)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonArrIndexWithEscape(java.lang.String key,
Path2 path,
java.lang.Object scalar) |
java.util.List<java.lang.Long> |
jsonArrInsert(java.lang.String key,
Path2 path,
int index,
java.lang.Object... objects) |
long |
jsonArrInsert(java.lang.String key,
Path path,
int index,
java.lang.Object... pojos)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonArrInsertWithEscape(java.lang.String key,
Path2 path,
int index,
java.lang.Object... objects) |
java.lang.Long |
jsonArrLen(java.lang.String key)
Deprecated.
|
java.lang.Long |
jsonArrLen(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonArrLen(java.lang.String key,
Path2 path) |
java.lang.Object |
jsonArrPop(java.lang.String key)
Deprecated.
|
<T> T |
jsonArrPop(java.lang.String key,
java.lang.Class<T> clazz)
Deprecated.
|
<T> T |
jsonArrPop(java.lang.String key,
java.lang.Class<T> clazz,
Path path)
Deprecated.
|
<T> T |
jsonArrPop(java.lang.String key,
java.lang.Class<T> clazz,
Path path,
int index)
Deprecated.
|
java.lang.Object |
jsonArrPop(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.lang.Object> |
jsonArrPop(java.lang.String key,
Path2 path) |
java.util.List<java.lang.Object> |
jsonArrPop(java.lang.String key,
Path2 path,
int index) |
java.lang.Object |
jsonArrPop(java.lang.String key,
Path path,
int index)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonArrTrim(java.lang.String key,
Path2 path,
int start,
int stop) |
java.lang.Long |
jsonArrTrim(java.lang.String key,
Path path,
int start,
int stop)
Deprecated.
|
long |
jsonClear(java.lang.String key) |
long |
jsonClear(java.lang.String key,
Path path)
Deprecated.
|
long |
jsonClear(java.lang.String key,
Path2 path) |
long |
jsonDebugMemory(java.lang.String key)
Deprecated.
|
long |
jsonDebugMemory(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonDebugMemory(java.lang.String key,
Path2 path) |
long |
jsonDel(java.lang.String key) |
long |
jsonDel(java.lang.String key,
Path path)
Deprecated.
|
long |
jsonDel(java.lang.String key,
Path2 path) |
java.lang.Object |
jsonGet(java.lang.String key) |
<T> T |
jsonGet(java.lang.String key,
java.lang.Class<T> clazz)
Deprecated.
|
<T> T |
jsonGet(java.lang.String key,
java.lang.Class<T> clazz,
Path... paths)
Deprecated.
|
java.lang.Object |
jsonGet(java.lang.String key,
Path... paths)
Deprecated.
|
java.lang.Object |
jsonGet(java.lang.String key,
Path2... paths) |
java.lang.String |
jsonGetAsPlainString(java.lang.String key,
Path path)
Deprecated.
|
java.lang.String |
jsonMerge(java.lang.String key,
Path2 path,
java.lang.Object object) |
java.lang.String |
jsonMerge(java.lang.String key,
Path path,
java.lang.Object pojo)
Deprecated.
|
java.util.List<org.json.JSONArray> |
jsonMGet(Path2 path,
java.lang.String... keys) |
<T> java.util.List<T> |
jsonMGet(Path path,
java.lang.Class<T> clazz,
java.lang.String... keys)
Deprecated.
|
java.lang.Object |
jsonNumIncrBy(java.lang.String key,
Path2 path,
double value) |
double |
jsonNumIncrBy(java.lang.String key,
Path path,
double value)
Deprecated.
|
java.util.List<java.lang.String> |
jsonObjKeys(java.lang.String key)
Deprecated.
|
java.util.List<java.lang.String> |
jsonObjKeys(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.util.List<java.lang.String>> |
jsonObjKeys(java.lang.String key,
Path2 path) |
java.lang.Long |
jsonObjLen(java.lang.String key)
Deprecated.
|
java.lang.Long |
jsonObjLen(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonObjLen(java.lang.String key,
Path2 path) |
java.lang.String |
jsonSet(java.lang.String key,
Path2 path,
java.lang.Object object) |
java.lang.String |
jsonSet(java.lang.String key,
Path2 path,
java.lang.Object pojo,
JsonSetParams params) |
java.lang.String |
jsonSet(java.lang.String key,
Path path,
java.lang.Object pojo)
Deprecated.
|
java.lang.String |
jsonSet(java.lang.String key,
Path path,
java.lang.Object pojo,
JsonSetParams params)
Deprecated.
|
java.lang.String |
jsonSetWithEscape(java.lang.String key,
Path2 path,
java.lang.Object object) |
java.lang.String |
jsonSetWithEscape(java.lang.String key,
Path2 path,
java.lang.Object pojo,
JsonSetParams params) |
java.lang.String |
jsonSetWithPlainString(java.lang.String key,
Path path,
java.lang.String string)
Deprecated.
|
long |
jsonStrAppend(java.lang.String key,
java.lang.Object string)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonStrAppend(java.lang.String key,
Path2 path,
java.lang.Object string) |
long |
jsonStrAppend(java.lang.String key,
Path path,
java.lang.Object string)
Deprecated.
|
java.lang.Long |
jsonStrLen(java.lang.String key)
Deprecated.
|
java.lang.Long |
jsonStrLen(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.lang.Long> |
jsonStrLen(java.lang.String key,
Path2 path) |
java.lang.String |
jsonToggle(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.lang.Boolean> |
jsonToggle(java.lang.String key,
Path2 path) |
java.lang.Class<?> |
jsonType(java.lang.String key)
Deprecated.
|
java.lang.Class<?> |
jsonType(java.lang.String key,
Path path)
Deprecated.
|
java.util.List<java.lang.Class<?>> |
jsonType(java.lang.String key,
Path2 path) |
java.util.Set<byte[]> |
keys(byte[] pattern) |
java.util.Set<java.lang.String> |
keys(java.lang.String pattern)
Keys Command
Returns all the keys matching the glob-style pattern as space separated strings.
|
LCSMatchResult |
lcs(byte[] keyA,
byte[] keyB,
LCSParams params)
Calculate the longest common subsequence of keyA and keyB.
|
LCSMatchResult |
lcs(java.lang.String keyA,
java.lang.String keyB,
LCSParams params)
Calculate the longest common subsequence of keyA and keyB.
|
byte[] |
lindex(byte[] key,
long index) |
java.lang.String |
lindex(java.lang.String key,
long index)
Returns the element at index in the list stored at key. 0 is the first element, 1 the second
and so on.
|
long |
linsert(byte[] key,
ListPosition where,
byte[] pivot,
byte[] value) |
long |
linsert(java.lang.String key,
ListPosition where,
java.lang.String pivot,
java.lang.String value)
Inserts element in the list stored at key either before or after the reference value pivot.
|
long |
llen(byte[] key) |
long |
llen(java.lang.String key)
Return the length of the list stored at the specified key.
|
byte[] |
lmove(byte[] srcKey,
byte[] dstKey,
ListDirection from,
ListDirection to) |
java.lang.String |
lmove(java.lang.String srcKey,
java.lang.String dstKey,
ListDirection from,
ListDirection to)
Pop an element from a list, push it to another list and return it
|
KeyValue<byte[],java.util.List<byte[]>> |
lmpop(ListDirection direction,
byte[]... keys) |
KeyValue<byte[],java.util.List<byte[]>> |
lmpop(ListDirection direction,
int count,
byte[]... keys) |
KeyValue<java.lang.String,java.util.List<java.lang.String>> |
lmpop(ListDirection direction,
int count,
java.lang.String... keys) |
KeyValue<java.lang.String,java.util.List<java.lang.String>> |
lmpop(ListDirection direction,
java.lang.String... keys) |
byte[] |
lpop(byte[] key) |
java.util.List<byte[]> |
lpop(byte[] key,
int count) |
java.lang.String |
lpop(java.lang.String key)
Atomically return and remove the first (LPOP) or last (RPOP) element of the list.
|
java.util.List<java.lang.String> |
lpop(java.lang.String key,
int count)
Atomically return and remove the first (LPOP) or last (RPOP) element of the list.
|
java.lang.Long |
lpos(byte[] key,
byte[] element) |
java.lang.Long |
lpos(byte[] key,
byte[] element,
LPosParams params) |
java.util.List<java.lang.Long> |
lpos(byte[] key,
byte[] element,
LPosParams params,
long count) |
java.lang.Long |
lpos(java.lang.String key,
java.lang.String element)
Returns the index of the first matching element inside a redis list.
|
java.lang.Long |
lpos(java.lang.String key,
java.lang.String element,
LPosParams params)
In case there are multiple matches Rank option specifies the "rank" of the element to return.
|
java.util.List<java.lang.Long> |
lpos(java.lang.String key,
java.lang.String element,
LPosParams params,
long count)
Returns the index of matching elements inside a Redis list.
|
long |
lpush(byte[] key,
byte[]... args) |
long |
lpush(java.lang.String key,
java.lang.String... string)
Add the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key.
|
long |
lpushx(byte[] key,
byte[]... args) |
long |
lpushx(java.lang.String key,
java.lang.String... strings)
Inserts specified values at the head of the list stored at key.
|
java.util.List<byte[]> |
lrange(byte[] key,
long start,
long stop) |
java.util.List<java.lang.String> |
lrange(java.lang.String key,
long start,
long stop)
Return the specified elements of the list stored at the specified key.
|
long |
lrem(byte[] key,
long count,
byte[] value) |
long |
lrem(java.lang.String key,
long count,
java.lang.String value)
Remove the first count occurrences of the value element from the list.
|
java.lang.String |
lset(byte[] key,
long index,
byte[] value) |
java.lang.String |
lset(java.lang.String key,
long index,
java.lang.String value)
Set a new value as the element at index position of the List at key.
|
java.lang.String |
ltrim(byte[] key,
long start,
long stop) |
java.lang.String |
ltrim(java.lang.String key,
long start,
long stop)
Trim an existing list so that it will contain only the specified range of elements specified.
|
java.lang.Long |
memoryUsage(byte[] key) |
java.lang.Long |
memoryUsage(byte[] key,
int samples) |
java.lang.Long |
memoryUsage(java.lang.String key)
Memory Usage Command
Report the number of bytes that a key and its value require to be stored in RAM.
|
java.lang.Long |
memoryUsage(java.lang.String key,
int samples)
Memory Usage Command
Report the number of bytes that a key and its value require to be stored in RAM.
|
java.util.List<byte[]> |
mget(byte[]... keys) |
java.util.List<java.lang.String> |
mget(java.lang.String... keys)
MGet Command
Get the values of all the specified keys.
|
java.lang.String |
migrate(java.lang.String host,
int port,
byte[] key,
int timeout) |
java.lang.String |
migrate(java.lang.String host,
int port,
int timeout,
MigrateParams params,
byte[]... keys) |
java.lang.String |
migrate(java.lang.String host,
int port,
int timeout,
MigrateParams params,
java.lang.String... keys)
Migrate Command
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
java.lang.String |
migrate(java.lang.String host,
int port,
java.lang.String key,
int timeout)
Migrate Command
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
java.lang.String |
mset(byte[]... keysvalues) |
java.lang.String |
mset(java.lang.String... keysvalues)
MSet Command
Set the respective keys to the respective values.
|
long |
msetnx(byte[]... keysvalues) |
long |
msetnx(java.lang.String... keysvalues)
MSetNX Command
Set the respective keys to the respective values.
|
AbstractTransaction |
multi() |
byte[] |
objectEncoding(byte[] key) |
java.lang.String |
objectEncoding(java.lang.String key)
Object Encoding Command
Return the internal encoding for the Redis object stored at key.
|
java.lang.Long |
objectFreq(byte[] key) |
java.lang.Long |
objectFreq(java.lang.String key)
Object Freq Command
Return the logarithmic access frequency counter of a Redis object stored at key.
|
java.lang.Long |
objectIdletime(byte[] key) |
java.lang.Long |
objectIdletime(java.lang.String key)
Object IdleTime Command
Return the time in seconds since the last access to the value stored at key.
|
java.lang.Long |
objectRefcount(byte[] key) |
java.lang.Long |
objectRefcount(java.lang.String key)
Object Refcount Command
Return the reference count of the stored at key.
|
long |
persist(byte[] key) |
long |
persist(java.lang.String key)
Persist Command
Undo a
expire at turning the expire key into a normal key. |
long |
pexpire(byte[] key,
long milliseconds) |
long |
pexpire(byte[] key,
long milliseconds,
ExpiryOption expiryOption) |
long |
pexpire(java.lang.String key,
long milliseconds)
PExpire Command
This command works exactly like
EXPIRE but the time
to live of the key is specified in milliseconds instead of seconds. |
long |
pexpire(java.lang.String key,
long milliseconds,
ExpiryOption expiryOption)
Similar to
EXPIRE but with optional expiry setting. |
long |
pexpireAt(byte[] key,
long millisecondsTimestamp) |
long |
pexpireAt(byte[] key,
long millisecondsTimestamp,
ExpiryOption expiryOption) |
long |
pexpireAt(java.lang.String key,
long millisecondsTimestamp)
PExpireAt Command
This command works exactly like
EXPIREAT but
Unix time at which the key will expire is specified in milliseconds instead of seconds. |
long |
pexpireAt(java.lang.String key,
long millisecondsTimestamp,
ExpiryOption expiryOption)
|
long |
pexpireTime(byte[] key) |
long |
pexpireTime(java.lang.String key)
PExpireTime Command
Similar to
EXPIRETIME but returns the absolute Unix expiration
timestamp in milliseconds instead of seconds. |
long |
pfadd(byte[] key,
byte[]... elements) |
long |
pfadd(java.lang.String key,
java.lang.String... elements) |
long |
pfcount(byte[]... keys) |
long |
pfcount(byte[] key) |
long |
pfcount(java.lang.String... keys) |
long |
pfcount(java.lang.String key) |
java.lang.String |
pfmerge(byte[] destkey,
byte[]... sourcekeys) |
java.lang.String |
pfmerge(java.lang.String destkey,
java.lang.String... sourcekeys) |
java.lang.String |
ping() |
AbstractPipeline |
pipelined() |
java.lang.String |
psetex(byte[] key,
long milliseconds,
byte[] value) |
java.lang.String |
psetex(java.lang.String key,
long milliseconds,
java.lang.String value)
PSetEx Command
PSETEX works exactly like
SETEX with the sole difference
that the expire time is specified in milliseconds instead of seconds. |
void |
psubscribe(BinaryJedisPubSub jedisPubSub,
byte[]... patterns) |
void |
psubscribe(JedisPubSub jedisPubSub,
java.lang.String... patterns) |
long |
pttl(byte[] key) |
long |
pttl(java.lang.String key)
PTTL Command
The PTTL command returns the remaining time to live in milliseconds of a key that has an
EXPIRE set. |
long |
publish(byte[] channel,
byte[] message) |
long |
publish(java.lang.String channel,
java.lang.String message) |
byte[] |
randomBinaryKey() |
java.lang.String |
randomKey()
RandomKey Command
Return a randomly selected key from the currently selected DB.
|
java.lang.String |
rename(byte[] oldkey,
byte[] newkey) |
java.lang.String |
rename(java.lang.String oldkey,
java.lang.String newkey)
|
long |
renamenx(byte[] oldkey,
byte[] newkey) |
long |
renamenx(java.lang.String oldkey,
java.lang.String newkey)
RenameNX Command
Rename oldkey into newkey but fails if the destination key newkey already exists.
|
java.lang.String |
restore(byte[] key,
long ttl,
byte[] serializedValue) |
java.lang.String |
restore(byte[] key,
long ttl,
byte[] serializedValue,
RestoreParams params) |
java.lang.String |
restore(java.lang.String key,
long ttl,
byte[] serializedValue)
Restore Command
Create a key associated with a value that is obtained by deserializing the provided serialized
value (obtained via
DUMP). |
java.lang.String |
restore(java.lang.String key,
long ttl,
byte[] serializedValue,
RestoreParams params)
Restore Command
Create a key associated with a value that is obtained by deserializing the provided serialized
value (obtained via
DUMP). |
byte[] |
rpop(byte[] key) |
java.util.List<byte[]> |
rpop(byte[] key,
int count) |
java.lang.String |
rpop(java.lang.String key)
Atomically return and remove the first (LPOP) or last (RPOP) element of the list.
|
java.util.List<java.lang.String> |
rpop(java.lang.String key,
int count)
Atomically return and remove the first (LPOP) or last (RPOP) element of the list.
|
byte[] |
rpoplpush(byte[] srckey,
byte[] dstkey) |
java.lang.String |
rpoplpush(java.lang.String srckey,
java.lang.String dstkey)
Atomically return and remove the last (tail) element of the srckey list, and push the element
as the first (head) element of the dstkey list.
|
long |
rpush(byte[] key,
byte[]... args) |
long |
rpush(java.lang.String key,
java.lang.String... string)
Add the string value to the head (LPUSH) or tail (RPUSH) of the list stored at key.
|
long |
rpushx(byte[] key,
byte[]... args) |
long |
rpushx(java.lang.String key,
java.lang.String... strings)
Inserts specified values at the tail of the list stored at key.
|
long |
sadd(byte[] key,
byte[]... members) |
long |
sadd(java.lang.String key,
java.lang.String... members)
Add the specified member to the set value stored at key.
|
ScanResult<byte[]> |
scan(byte[] cursor) |
ScanResult<byte[]> |
scan(byte[] cursor,
ScanParams params) |
ScanResult<byte[]> |
scan(byte[] cursor,
ScanParams params,
byte[] type) |
ScanResult<java.lang.String> |
scan(java.lang.String cursor) |
ScanResult<java.lang.String> |
scan(java.lang.String cursor,
ScanParams params) |
ScanResult<java.lang.String> |
scan(java.lang.String cursor,
ScanParams params,
java.lang.String type) |
ScanIteration |
scanIteration(int batchCount,
java.lang.String match) |
ScanIteration |
scanIteration(int batchCount,
java.lang.String match,
java.lang.String type) |
long |
scard(byte[] key) |
long |
scard(java.lang.String key)
Return the set cardinality (number of elements).
|
java.util.List<java.lang.Boolean> |
scriptExists(byte[] sampleKey,
byte[]... sha1s) |
java.lang.Boolean |
scriptExists(byte[] sha1,
byte[] sampleKey) |
java.util.List<java.lang.Boolean> |
scriptExists(java.util.List<java.lang.String> sha1s) |
java.util.List<java.lang.Boolean> |
scriptExists(java.lang.String sampleKey,
java.lang.String... sha1s) |
java.lang.Boolean |
scriptExists(java.lang.String sha1,
java.lang.String sampleKey) |
java.lang.String |
scriptFlush() |
java.lang.String |
scriptFlush(byte[] sampleKey) |
java.lang.String |
scriptFlush(byte[] sampleKey,
FlushMode flushMode) |
java.lang.String |
scriptFlush(java.lang.String sampleKey) |
java.lang.String |
scriptFlush(java.lang.String sampleKey,
FlushMode flushMode) |
java.lang.String |
scriptKill() |
java.lang.String |
scriptKill(byte[] sampleKey) |
java.lang.String |
scriptKill(java.lang.String sampleKey) |
byte[] |
scriptLoad(byte[] script,
byte[] sampleKey) |
java.lang.String |
scriptLoad(java.lang.String script) |
java.lang.String |
scriptLoad(java.lang.String script,
java.lang.String sampleKey) |
java.util.Set<byte[]> |
sdiff(byte[]... keys) |
java.util.Set<java.lang.String> |
sdiff(java.lang.String... keys)
Return the difference between the Sets stored at
keys
Example:
key1 = [x, a, b, c]
key2 = [c]
key3 = [a, d]
SDIFF key1,key2,key3 => [x, b]
Non existing keys are considered like empty sets. |
long |
sdiffstore(byte[] dstkey,
byte[]... keys) |
long |
sdiffstore(java.lang.String dstkey,
java.lang.String... keys)
This command works exactly like {@link SetCommands#sdiff(String...)
|
java.lang.Object |
sendBlockingCommand(byte[] sampleKey,
ProtocolCommand cmd,
byte[]... args) |
java.lang.Object |
sendBlockingCommand(ProtocolCommand cmd,
byte[]... args) |
java.lang.Object |
sendBlockingCommand(ProtocolCommand cmd,
java.lang.String... args) |
java.lang.Object |
sendBlockingCommand(java.lang.String sampleKey,
ProtocolCommand cmd,
java.lang.String... args) |
java.lang.Object |
sendCommand(byte[] sampleKey,
ProtocolCommand cmd,
byte[]... args) |
java.lang.Object |
sendCommand(ProtocolCommand cmd) |
java.lang.Object |
sendCommand(ProtocolCommand cmd,
byte[]... args) |
java.lang.Object |
sendCommand(ProtocolCommand cmd,
java.lang.String... args) |
java.lang.Object |
sendCommand(java.lang.String sampleKey,
ProtocolCommand cmd,
java.lang.String... args) |
java.lang.String |
set(byte[] key,
byte[] value) |
java.lang.String |
set(byte[] key,
byte[] value,
SetParams params) |
java.lang.String |
set(java.lang.String key,
java.lang.String value)
Set Command
Set the string value as value of the key.
|
java.lang.String |
set(java.lang.String key,
java.lang.String value,
SetParams params)
Set Command
Set the string value as value of the key.
|
boolean |
setbit(byte[] key,
long offset,
boolean value) |
boolean |
setbit(java.lang.String key,
long offset,
boolean value)
SetBit Command
Sets or clears the bit at offset in the string value stored at key.
|
void |
setBroadcastAndRoundRobinConfig(JedisBroadcastAndRoundRobinConfig config) |
void |
setDefaultSearchDialect(int dialect) |
java.lang.String |
setex(byte[] key,
long seconds,
byte[] value) |
java.lang.String |
setex(java.lang.String key,
long seconds,
java.lang.String value)
|
byte[] |
setGet(byte[] key,
byte[] value) |
byte[] |
setGet(byte[] key,
byte[] value,
SetParams params) |
java.lang.String |
setGet(java.lang.String key,
java.lang.String value) |
java.lang.String |
setGet(java.lang.String key,
java.lang.String value,
SetParams params) |
void |
setJsonObjectMapper(JsonObjectMapper jsonObjectMapper) |
void |
setKeyArgumentPreProcessor(CommandKeyArgumentPreProcessor keyPreProcessor) |
long |
setnx(byte[] key,
byte[] value) |
long |
setnx(java.lang.String key,
java.lang.String value)
SetNE Command
SETNX works exactly like
SET with the only difference that if
the key already exists no operation is performed. |
protected void |
setProtocol(RedisProtocol protocol)
Deprecated.
|
long |
setrange(byte[] key,
long offset,
byte[] value) |
long |
setrange(java.lang.String key,
long offset,
java.lang.String value)
SetRange Command
GETRANGE overwrite part of the string stored at key, starting at the specified offset, for the entire
length of value.
|
java.util.Set<byte[]> |
sinter(byte[]... keys) |
java.util.Set<java.lang.String> |
sinter(java.lang.String... keys)
Return the members of a set resulting from the intersection of all the sets hold at the
specified keys.
|
long |
sintercard(byte[]... keys)
This command works exactly like
SINTER but instead of returning
the result set, it returns just the cardinality of the result. |
long |
sintercard(int limit,
byte[]... keys)
This command works exactly like
SINTER but instead of returning
the result set, it returns just the cardinality of the result. |
long |
sintercard(int limit,
java.lang.String... keys)
This command works exactly like
SINTER but instead of returning
the result set, it returns just the cardinality of the result. |
long |
sintercard(java.lang.String... keys)
This command works exactly like
SINTER but instead of returning
the result set, it returns just the cardinality of the result. |
long |
sinterstore(byte[] dstkey,
byte[]... keys) |
long |
sinterstore(java.lang.String dstkey,
java.lang.String... keys)
This command works exactly like {@link SetCommands#sinter(String...)
|
boolean |
sismember(byte[] key,
byte[] member) |
boolean |
sismember(java.lang.String key,
java.lang.String member)
Return true if member is a member of the set stored at key, otherwise false is returned.
|
java.lang.String |
slowlogReset() |
java.util.Set<byte[]> |
smembers(byte[] key) |
java.util.Set<java.lang.String> |
smembers(java.lang.String key)
Return all the members (elements) of the set value stored at key.
|
java.util.List<java.lang.Boolean> |
smismember(byte[] key,
byte[]... members) |
java.util.List<java.lang.Boolean> |
smismember(java.lang.String key,
java.lang.String... members)
Returns whether each member is a member of the set stored at key.
|
long |
smove(byte[] srckey,
byte[] dstkey,
byte[] member) |
long |
smove(java.lang.String srckey,
java.lang.String dstkey,
java.lang.String member)
Move the specified member from the set at srckey to the set at dstkey.
|
java.util.List<byte[]> |
sort(byte[] key) |
long |
sort(byte[] key,
byte[] dstkey) |
java.util.List<byte[]> |
sort(byte[] key,
SortingParams sortingParams) |
long |
sort(byte[] key,
SortingParams sortingParams,
byte[] dstkey) |
java.util.List<java.lang.String> |
sort(java.lang.String key)
Sort Command
Sort a Set or a List.
|
java.util.List<java.lang.String> |
sort(java.lang.String key,
SortingParams sortingParams)
Sort a Set or a List accordingly to the specified parameters.
|
long |
sort(java.lang.String key,
SortingParams sortingParams,
java.lang.String dstkey)
Similar to
SORT but store the result in dstkey. |
long |
sort(java.lang.String key,
java.lang.String dstkey)
Similar to
SORT but store the result in dstkey. |
java.util.List<byte[]> |
sortReadonly(byte[] key,
SortingParams sortingParams) |
java.util.List<java.lang.String> |
sortReadonly(java.lang.String key,
SortingParams sortingParams)
Read-only variant of the
SORT command. |
byte[] |
spop(byte[] key) |
java.util.Set<byte[]> |
spop(byte[] key,
long count) |
java.lang.String |
spop(java.lang.String key)
Remove a random element from a Set returning it as return value.
|
java.util.Set<java.lang.String> |
spop(java.lang.String key,
long count)
By default, the command
SetCommands.spop(String) pops a single member from the set. |
byte[] |
srandmember(byte[] key) |
java.util.List<byte[]> |
srandmember(byte[] key,
int count) |
java.lang.String |
srandmember(java.lang.String key)
Return a random element from a Set, without removing the element.
|
java.util.List<java.lang.String> |
srandmember(java.lang.String key,
int count)
Return a random elements from a Set, without removing the elements.
|
long |
srem(byte[] key,
byte[]... members) |
long |
srem(java.lang.String key,
java.lang.String... members)
Remove the specified member from the set value stored at key.
|
ScanResult<byte[]> |
sscan(byte[] key,
byte[] cursor,
ScanParams params) |
ScanResult<java.lang.String> |
sscan(java.lang.String key,
java.lang.String cursor,
ScanParams params) |
long |
strlen(byte[] key) |
long |
strlen(java.lang.String key)
StrLen Command
Return the length of the string value stored at key.
|
void |
subscribe(BinaryJedisPubSub jedisPubSub,
byte[]... channels) |
void |
subscribe(JedisPubSub jedisPubSub,
java.lang.String... channels) |
byte[] |
substr(byte[] key,
int start,
int end) |
java.lang.String |
substr(java.lang.String key,
int start,
int end)
SubStr Command
Return a subset of the string from offset start to offset end (both offsets are inclusive).
|
java.util.Set<byte[]> |
sunion(byte[]... keys) |
java.util.Set<java.lang.String> |
sunion(java.lang.String... keys)
Return the members of a set resulting from the union of all the sets hold at the specified
keys.
|
long |
sunionstore(byte[] dstkey,
byte[]... keys) |
long |
sunionstore(java.lang.String dstkey,
java.lang.String... keys)
This command works exactly like {@link SetCommands#sunion(String...)
|
java.lang.String |
tdigestAdd(java.lang.String key,
double... values)
TDIGEST.ADD key value weight [ value weight ...] |
java.util.List<java.lang.Double> |
tdigestByRank(java.lang.String key,
long... ranks) |
java.util.List<java.lang.Double> |
tdigestByRevRank(java.lang.String key,
long... ranks) |
java.util.List<java.lang.Double> |
tdigestCDF(java.lang.String key,
double... values)
TDIGEST.CDF key value [value ...] |
java.lang.String |
tdigestCreate(java.lang.String key)
TDIGEST.CREATE key |
java.lang.String |
tdigestCreate(java.lang.String key,
int compression)
TDIGEST.CREATE key [compression] |
java.util.Map<java.lang.String,java.lang.Object> |
tdigestInfo(java.lang.String key)
TDIGEST.INFO key |
double |
tdigestMax(java.lang.String key)
TDIGEST.MAX key |
java.lang.String |
tdigestMerge(java.lang.String destinationKey,
java.lang.String... sourceKeys)
TDIGEST.MERGE destination-key numkeys source-key [source-key ...] |
java.lang.String |
tdigestMerge(TDigestMergeParams mergeParams,
java.lang.String destinationKey,
java.lang.String... sourceKeys)
{@code TDIGEST.MERGE destination-key numkeys source-key [source-key ...]
|
double |
tdigestMin(java.lang.String key)
TDIGEST.MIN key |
java.util.List<java.lang.Double> |
tdigestQuantile(java.lang.String key,
double... quantiles)
TDIGEST.QUANTILE key quantile [quantile ...] |
java.util.List<java.lang.Long> |
tdigestRank(java.lang.String key,
double... values) |
java.lang.String |
tdigestReset(java.lang.String key)
TDIGEST.RESET key |
java.util.List<java.lang.Long> |
tdigestRevRank(java.lang.String key,
double... values) |
double |
tdigestTrimmedMean(java.lang.String key,
double lowCutQuantile,
double highCutQuantile)
TDIGEST.TRIMMED_MEAN key low_cut_quantile high_cut_quantile |
java.util.List<java.lang.String> |
topkAdd(java.lang.String key,
java.lang.String... items)
TOPK.ADD {key} {item ...} |
java.util.List<java.lang.String> |
topkIncrBy(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Long> itemIncrements)
TOPK.INCRBY {key} {item} {increment} [{item} {increment} ...] |
java.util.Map<java.lang.String,java.lang.Object> |
topkInfo(java.lang.String key)
TOPK.INFO {key} |
java.util.List<java.lang.String> |
topkList(java.lang.String key)
TOPK.LIST {key} |
java.util.Map<java.lang.String,java.lang.Long> |
topkListWithCount(java.lang.String key)
TOPK.LIST {key} WITHCOUNT |
java.util.List<java.lang.Boolean> |
topkQuery(java.lang.String key,
java.lang.String... items)
TOPK.QUERY {key} {item ...} |
java.lang.String |
topkReserve(java.lang.String key,
long topk)
TOPK.RESERVE {key} {topk} |
java.lang.String |
topkReserve(java.lang.String key,
long topk,
long width,
long depth,
double decay)
TOPK.RESERVE {key} {topk} [{width} {depth} {decay}] |
long |
touch(byte[]... keys) |
long |
touch(byte[] key) |
long |
touch(java.lang.String... keys)
Touch Command
Alters the last access time of a key(s).
|
long |
touch(java.lang.String key)
Touch Command
Alters the last access time of a key.
|
AbstractTransaction |
transaction(boolean doMulti) |
long |
tsAdd(java.lang.String key,
double value)
TS.ADD key * value |
long |
tsAdd(java.lang.String key,
long timestamp,
double value)
TS.ADD key timestamp value |
long |
tsAdd(java.lang.String key,
long timestamp,
double value,
TSAddParams addParams)
TS.ADD key timestamp value
[RETENTION retentionTime]
[ENCODING <COMPRESSED|UNCOMPRESSED>]
[CHUNK_SIZE size]
[DUPLICATE_POLICY policy]
[ON_DUPLICATE policy_ovr]
[LABELS label value..] |
long |
tsAdd(java.lang.String key,
long timestamp,
double value,
TSCreateParams createParams) |
java.lang.String |
tsAlter(java.lang.String key,
TSAlterParams alterParams)
TS.ALTER key [RETENTION retentionTime] [LABELS label value..] |
java.lang.String |
tsCreate(java.lang.String key)
TS.CREATE key |
java.lang.String |
tsCreate(java.lang.String key,
TSCreateParams createParams)
TS.CREATE key [RETENTION retentionTime] [ENCODING [UNCOMPRESSED|COMPRESSED]] [CHUNK_SIZE size] [DUPLICATE_POLICY policy] [LABELS label value..] |
java.lang.String |
tsCreateRule(java.lang.String sourceKey,
java.lang.String destKey,
AggregationType aggregationType,
long timeBucket)
TS.CREATERULE sourceKey destKey AGGREGATION aggregationType timeBucket |
java.lang.String |
tsCreateRule(java.lang.String sourceKey,
java.lang.String destKey,
AggregationType aggregationType,
long bucketDuration,
long alignTimestamp)
TS.CREATERULE sourceKey destKey AGGREGATION aggregationType bucketDuration [alignTimestamp] |
long |
tsDecrBy(java.lang.String key,
double value) |
long |
tsDecrBy(java.lang.String key,
double value,
long timestamp) |
long |
tsDecrBy(java.lang.String key,
double subtrahend,
TSDecrByParams decrByParams)
TS.DECRBY key subtrahend
[TIMESTAMP timestamp]
[RETENTION retentionPeriod]
[ENCODING <COMPRESSED|UNCOMPRESSED>]
[CHUNK_SIZE size]
[DUPLICATE_POLICY policy]
[IGNORE ignoreMaxTimediff ignoreMaxValDiff]
[LABELS [label value ...]] |
long |
tsDel(java.lang.String key,
long fromTimestamp,
long toTimestamp)
TS.DEL key fromTimestamp toTimestamp |
java.lang.String |
tsDeleteRule(java.lang.String sourceKey,
java.lang.String destKey)
TS.DELETERULE sourceKey destKey |
TSElement |
tsGet(java.lang.String key)
TS.GET key |
TSElement |
tsGet(java.lang.String key,
TSGetParams getParams)
TS.GET key [LATEST] |
long |
tsIncrBy(java.lang.String key,
double value) |
long |
tsIncrBy(java.lang.String key,
double value,
long timestamp) |
long |
tsIncrBy(java.lang.String key,
double addend,
TSIncrByParams incrByParams)
TS.INCRBY key addend
[TIMESTAMP timestamp]
[RETENTION retentionPeriod]
[ENCODING <COMPRESSED|UNCOMPRESSED>]
[CHUNK_SIZE size]
[DUPLICATE_POLICY policy]
[IGNORE ignoreMaxTimediff ignoreMaxValDiff]
[LABELS [label value ...]] |
TSInfo |
tsInfo(java.lang.String key) |
TSInfo |
tsInfoDebug(java.lang.String key) |
java.util.List<java.lang.Long> |
tsMAdd(java.util.Map.Entry<java.lang.String,TSElement>... entries)
TS.MADD key timestamp value [key timestamp value ...] |
java.util.Map<java.lang.String,TSMGetElement> |
tsMGet(TSMGetParams multiGetParams,
java.lang.String... filters)
{@code TS.MGET [LATEST] [ WITHLABELS | SELECTED_LABELS label...]
|
java.util.Map<java.lang.String,TSMRangeElements> |
tsMRange(long fromTimestamp,
long toTimestamp,
java.lang.String... filters)
TS.MRANGE fromTimestamp toTimestamp FILTER filter... |
java.util.Map<java.lang.String,TSMRangeElements> |
tsMRange(TSMRangeParams multiRangeParams)
{@code TS.MRANGE fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS ts...]
|
java.util.Map<java.lang.String,TSMRangeElements> |
tsMRevRange(long fromTimestamp,
long toTimestamp,
java.lang.String... filters)
TS.MREVRANGE fromTimestamp toTimestamp FILTER filter... |
java.util.Map<java.lang.String,TSMRangeElements> |
tsMRevRange(TSMRangeParams multiRangeParams)
{@code TS.MREVRANGE fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS TS...]
|
java.util.List<java.lang.String> |
tsQueryIndex(java.lang.String... filters)
TS.QUERYINDEX filter... |
java.util.List<TSElement> |
tsRange(java.lang.String key,
long fromTimestamp,
long toTimestamp)
TS.RANGE key fromTimestamp toTimestamp |
java.util.List<TSElement> |
tsRange(java.lang.String key,
TSRangeParams rangeParams)
{@code TS.RANGE key fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS ts...]
|
java.util.List<TSElement> |
tsRevRange(java.lang.String key,
long fromTimestamp,
long toTimestamp)
TS.REVRANGE key fromTimestamp toTimestamp |
java.util.List<TSElement> |
tsRevRange(java.lang.String key,
TSRangeParams rangeParams)
{@code TS.REVRANGE key fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS TS...]
|
long |
ttl(byte[] key) |
long |
ttl(java.lang.String key)
TTL Command
The TTL command returns the remaining time to live in seconds of a key that has an
EXPIRE set. |
java.lang.String |
type(byte[] key) |
java.lang.String |
type(java.lang.String key)
Type Command
Return the type of the value stored at key in form of a string.
|
long |
unlink(byte[]... keys) |
long |
unlink(byte[] key) |
long |
unlink(java.lang.String... keys)
Similar to
SORT but can be used with multiple keys. |
long |
unlink(java.lang.String key)
Unlink Command
This command is very similar to
DEL: it removes the specified key. |
boolean |
vadd(byte[] key,
float[] vector,
byte[] element)
VADD Command Add a new element
into the vector set specified by key.
|
boolean |
vadd(byte[] key,
float[] vector,
byte[] element,
int reduceDim,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key with dimension reduction and additional parameters.
|
boolean |
vadd(byte[] key,
float[] vector,
byte[] element,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key with additional parameters.
|
boolean |
vadd(java.lang.String key,
float[] vector,
java.lang.String element)
VADD Command Add a new element
into the vector set specified by key.
|
boolean |
vadd(java.lang.String key,
float[] vector,
java.lang.String element,
int reduceDim,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key with dimension reduction and additional parameters.
|
boolean |
vadd(java.lang.String key,
float[] vector,
java.lang.String element,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key with additional parameters.
|
boolean |
vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] element)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format.
|
boolean |
vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] element,
int reduceDim,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format with dimension reduction and
additional parameters.
|
boolean |
vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] element,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format with additional parameters.
|
boolean |
vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format.
|
boolean |
vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element,
int reduceDim,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format with dimension reduction and
additional parameters.
|
boolean |
vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format with additional parameters.
|
long |
vcard(byte[] key)
VCARD Command Return the
number of elements in the specified vector set.
|
long |
vcard(java.lang.String key)
VCARD Command Return the
number of elements in the specified vector set.
|
long |
vdim(byte[] key)
VDIM Command Return the number
of dimensions of the vectors in the specified vector set.
|
long |
vdim(java.lang.String key)
VDIM Command Return the number
of dimensions of the vectors in the specified vector set.
|
java.util.List<java.lang.Double> |
vemb(byte[] key,
byte[] element)
VEMB Command Return the
approximate vector associated with a given element in the vector set.
|
java.util.List<java.lang.Double> |
vemb(java.lang.String key,
java.lang.String element)
VEMB Command Return the
approximate vector associated with a given element in the vector set.
|
RawVector |
vembRaw(byte[] key,
byte[] element)
VEMB Command Return the raw
vector data associated with a given element in the vector set.
|
RawVector |
vembRaw(java.lang.String key,
java.lang.String element)
VEMB Command Return the raw
vector data associated with a given element in the vector set.
|
byte[] |
vgetattr(byte[] key,
byte[] element)
VGETATTR Command Get the
attributes of an element in a vector set.
|
java.lang.String |
vgetattr(java.lang.String key,
java.lang.String element)
VGETATTR Command Get the
attributes of an element in a vector set.
|
VectorInfo |
vinfo(java.lang.String key)
VINFO Command Get information
about a vector set.
|
java.util.List<java.util.List<byte[]>> |
vlinks(byte[] key,
byte[] element)
VLINKS Command Return the
neighbors of a specified element in a vector set.
|
java.util.List<java.util.List<java.lang.String>> |
vlinks(java.lang.String key,
java.lang.String element)
VLINKS Command Return the
neighbors of a specified element in a vector set.
|
java.util.List<java.util.Map<byte[],java.lang.Double>> |
vlinksWithScores(byte[] key,
byte[] element)
VLINKS Command Return the
neighbors of a specified element in a vector set with similarity scores.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Double>> |
vlinksWithScores(java.lang.String key,
java.lang.String element)
VLINKS Command Return the
neighbors of a specified element in a vector set with similarity scores.
|
byte[] |
vrandmember(byte[] key)
VRANDMEMBER Command
Return a random element from a vector set.
|
java.util.List<byte[]> |
vrandmember(byte[] key,
int count)
VRANDMEMBER Command
Return random elements from a vector set.
|
java.lang.String |
vrandmember(java.lang.String key)
VRANDMEMBER Command
Return a random element from a vector set.
|
java.util.List<java.lang.String> |
vrandmember(java.lang.String key,
int count)
VRANDMEMBER Command
Return random elements from a vector set.
|
boolean |
vrem(byte[] key,
byte[] element)
VREM Command Remove an element
from a vector set.
|
boolean |
vrem(java.lang.String key,
java.lang.String element)
VREM Command Remove an element
from a vector set.
|
boolean |
vsetattr(byte[] key,
byte[] element,
byte[] attributes)
VSETATTR Command Set the
attributes of an element in a vector set.
|
boolean |
vsetattr(java.lang.String key,
java.lang.String element,
java.lang.String attributes)
VSETATTR Command Set the
attributes of an element in a vector set.
|
java.util.List<byte[]> |
vsim(byte[] key,
float[] vector)
VSIM Command Return elements
similar to a given vector.
|
java.util.List<byte[]> |
vsim(byte[] key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with additional parameters.
|
java.util.List<java.lang.String> |
vsim(java.lang.String key,
float[] vector)
VSIM Command Return elements
similar to a given vector.
|
java.util.List<java.lang.String> |
vsim(java.lang.String key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with additional parameters.
|
java.util.List<byte[]> |
vsimByElement(byte[] key,
byte[] element)
VSIM Command Return elements
similar to a given element in the vector set.
|
java.util.List<byte[]> |
vsimByElement(byte[] key,
byte[] element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with additional parameters.
|
java.util.List<java.lang.String> |
vsimByElement(java.lang.String key,
java.lang.String element)
VSIM Command Return elements
similar to a given element in the vector set.
|
java.util.List<java.lang.String> |
vsimByElement(java.lang.String key,
java.lang.String element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with additional parameters.
|
java.util.Map<byte[],java.lang.Double> |
vsimByElementWithScores(byte[] key,
byte[] element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with their similarity scores.
|
java.util.Map<java.lang.String,java.lang.Double> |
vsimByElementWithScores(java.lang.String key,
java.lang.String element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with their similarity scores.
|
java.util.Map<byte[],VSimScoreAttribs> |
vsimByElementWithScoresAndAttribs(byte[] key,
byte[] element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with their similarity scores and attributes.
|
java.util.Map<java.lang.String,VSimScoreAttribs> |
vsimByElementWithScoresAndAttribs(java.lang.String key,
java.lang.String element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with their similarity scores and attributes.
|
java.util.Map<byte[],java.lang.Double> |
vsimWithScores(byte[] key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores.
|
java.util.Map<java.lang.String,java.lang.Double> |
vsimWithScores(java.lang.String key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores.
|
java.util.Map<byte[],VSimScoreAttribs> |
vsimWithScoresAndAttribs(byte[] key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores and attributes.
|
java.util.Map<java.lang.String,VSimScoreAttribs> |
vsimWithScoresAndAttribs(java.lang.String key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores and attributes.
|
KeyValue<java.lang.Long,java.lang.Long> |
waitAOF(byte[] sampleKey,
long numLocal,
long numReplicas,
long timeout) |
KeyValue<java.lang.Long,java.lang.Long> |
waitAOF(java.lang.String sampleKey,
long numLocal,
long numReplicas,
long timeout) |
long |
waitReplicas(byte[] sampleKey,
int replicas,
long timeout) |
long |
waitReplicas(java.lang.String sampleKey,
int replicas,
long timeout) |
long |
xack(byte[] key,
byte[] group,
byte[]... ids) |
long |
xack(java.lang.String key,
java.lang.String group,
StreamEntryID... ids)
XACK key group ID [ID ...]
|
java.util.List<StreamEntryDeletionResult> |
xackdel(byte[] key,
byte[] group,
byte[]... ids)
XACKDEL key group [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
java.util.List<StreamEntryDeletionResult> |
xackdel(byte[] key,
byte[] group,
StreamDeletionPolicy trimMode,
byte[]... ids)
XACKDEL key group [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
java.util.List<StreamEntryDeletionResult> |
xackdel(java.lang.String key,
java.lang.String group,
StreamDeletionPolicy trimMode,
StreamEntryID... ids)
XACKDEL key group [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
java.util.List<StreamEntryDeletionResult> |
xackdel(java.lang.String key,
java.lang.String group,
StreamEntryID... ids)
XACKDEL key group [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
byte[] |
xadd(byte[] key,
XAddParams params,
java.util.Map<byte[],byte[]> hash) |
StreamEntryID |
xadd(java.lang.String key,
StreamEntryID id,
java.util.Map<java.lang.String,java.lang.String> hash)
XADD key ID field string [field string ...]
|
StreamEntryID |
xadd(java.lang.String key,
XAddParams params,
java.util.Map<java.lang.String,java.lang.String> hash) |
java.util.List<java.lang.Object> |
xautoclaim(byte[] key,
byte[] groupName,
byte[] consumerName,
long minIdleTime,
byte[] start,
XAutoClaimParams params) |
java.util.Map.Entry<StreamEntryID,java.util.List<StreamEntry>> |
xautoclaim(java.lang.String key,
java.lang.String group,
java.lang.String consumerName,
long minIdleTime,
StreamEntryID start,
XAutoClaimParams params)
XAUTOCLAIM key group consumer min-idle-time start [COUNT count]
|
java.util.List<java.lang.Object> |
xautoclaimJustId(byte[] key,
byte[] groupName,
byte[] consumerName,
long minIdleTime,
byte[] start,
XAutoClaimParams params) |
java.util.Map.Entry<StreamEntryID,java.util.List<StreamEntryID>> |
xautoclaimJustId(java.lang.String key,
java.lang.String group,
java.lang.String consumerName,
long minIdleTime,
StreamEntryID start,
XAutoClaimParams params)
XAUTOCLAIM key group consumer min-idle-time start [COUNT count] JUSTID
|
java.util.List<byte[]> |
xclaim(byte[] key,
byte[] group,
byte[] consumerName,
long minIdleTime,
XClaimParams params,
byte[]... ids) |
java.util.List<StreamEntry> |
xclaim(java.lang.String key,
java.lang.String group,
java.lang.String consumerName,
long minIdleTime,
XClaimParams params,
StreamEntryID... ids)
{@code XCLAIM key group consumer min-idle-time
|
java.util.List<byte[]> |
xclaimJustId(byte[] key,
byte[] group,
byte[] consumerName,
long minIdleTime,
XClaimParams params,
byte[]... ids) |
java.util.List<StreamEntryID> |
xclaimJustId(java.lang.String key,
java.lang.String group,
java.lang.String consumerName,
long minIdleTime,
XClaimParams params,
StreamEntryID... ids)
{@code XCLAIM key group consumer min-idle-time
|
long |
xdel(byte[] key,
byte[]... ids) |
long |
xdel(java.lang.String key,
StreamEntryID... ids)
XDEL key ID [ID ...]
|
java.util.List<StreamEntryDeletionResult> |
xdelex(byte[] key,
byte[]... ids)
XDELEX key [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
java.util.List<StreamEntryDeletionResult> |
xdelex(byte[] key,
StreamDeletionPolicy trimMode,
byte[]... ids)
XDELEX key [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
java.util.List<StreamEntryDeletionResult> |
xdelex(java.lang.String key,
StreamDeletionPolicy trimMode,
StreamEntryID... ids)
XDELEX key [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
java.util.List<StreamEntryDeletionResult> |
xdelex(java.lang.String key,
StreamEntryID... ids)
XDELEX key [KEEPREF | DELREF | ACKED] IDS numids id [id ...]
|
java.lang.String |
xgroupCreate(byte[] key,
byte[] groupName,
byte[] id,
boolean makeStream) |
java.lang.String |
xgroupCreate(java.lang.String key,
java.lang.String groupName,
StreamEntryID id,
boolean makeStream)
XGROUP CREATE key groupName <id or $> |
boolean |
xgroupCreateConsumer(byte[] key,
byte[] groupName,
byte[] consumerName) |
boolean |
xgroupCreateConsumer(java.lang.String key,
java.lang.String groupName,
java.lang.String consumerName)
XGROUP CREATECONSUMER key groupName consumerName
|
long |
xgroupDelConsumer(byte[] key,
byte[] groupName,
byte[] consumerName) |
long |
xgroupDelConsumer(java.lang.String key,
java.lang.String groupName,
java.lang.String consumerName)
XGROUP DELCONSUMER key groupName consumerName
|
long |
xgroupDestroy(byte[] key,
byte[] groupName) |
long |
xgroupDestroy(java.lang.String key,
java.lang.String groupName)
XGROUP DESTROY key groupName
|
java.lang.String |
xgroupSetID(byte[] key,
byte[] groupName,
byte[] id) |
java.lang.String |
xgroupSetID(java.lang.String key,
java.lang.String groupName,
StreamEntryID id)
XGROUP SETID key groupName <id or $> |
java.util.List<java.lang.Object> |
xinfoConsumers(byte[] key,
byte[] group) |
java.util.List<StreamConsumersInfo> |
xinfoConsumers(java.lang.String key,
java.lang.String group)
Introspection command used in order to retrieve different information about consumers in the group
|
java.util.List<StreamConsumerInfo> |
xinfoConsumers2(java.lang.String key,
java.lang.String group)
Introspection command used in order to retrieve different information about consumers in the group
|
java.util.List<java.lang.Object> |
xinfoGroups(byte[] key) |
java.util.List<StreamGroupInfo> |
xinfoGroups(java.lang.String key)
Introspection command used in order to retrieve different information about groups in the stream
|
java.lang.Object |
xinfoStream(byte[] key) |
StreamInfo |
xinfoStream(java.lang.String key)
Introspection command used in order to retrieve different information about the stream
|
java.lang.Object |
xinfoStreamFull(byte[] key)
Introspection command used in order to retrieve all information about the stream
|
java.lang.Object |
xinfoStreamFull(byte[] key,
int count)
Introspection command used in order to retrieve all information about the stream
|
StreamFullInfo |
xinfoStreamFull(java.lang.String key)
Introspection command used in order to retrieve all information about the stream
|
StreamFullInfo |
xinfoStreamFull(java.lang.String key,
int count)
Introspection command used in order to retrieve all information about the stream
|
long |
xlen(byte[] key) |
long |
xlen(java.lang.String key)
XLEN key
|
java.lang.Object |
xpending(byte[] key,
byte[] groupName) |
java.util.List<java.lang.Object> |
xpending(byte[] key,
byte[] groupName,
XPendingParams params) |
StreamPendingSummary |
xpending(java.lang.String key,
java.lang.String groupName)
XPENDING key group
|
java.util.List<StreamPendingEntry> |
xpending(java.lang.String key,
java.lang.String groupName,
XPendingParams params)
XPENDING key group [[IDLE min-idle-time] start end count [consumer]]
|
java.util.List<java.lang.Object> |
xrange(byte[] key,
byte[] start,
byte[] end) |
java.util.List<java.lang.Object> |
xrange(byte[] key,
byte[] start,
byte[] end,
int count) |
java.util.List<StreamEntry> |
xrange(java.lang.String key,
StreamEntryID start,
StreamEntryID end)
XRANGE key start end
|
java.util.List<StreamEntry> |
xrange(java.lang.String key,
StreamEntryID start,
StreamEntryID end,
int count)
XRANGE key start end COUNT count
|
java.util.List<StreamEntry> |
xrange(java.lang.String key,
java.lang.String start,
java.lang.String end) |
java.util.List<StreamEntry> |
xrange(java.lang.String key,
java.lang.String start,
java.lang.String end,
int count) |
java.util.List<java.lang.Object> |
xread(XReadParams xReadParams,
java.util.Map.Entry<byte[],byte[]>... streams)
Deprecated.
As of Jedis 6.1.0, use
xreadBinary(XReadParams, Map) or
xreadBinaryAsMap(XReadParams, Map) for type safety and better stream entry
parsing. |
java.util.List<java.util.Map.Entry<java.lang.String,java.util.List<StreamEntry>>> |
xread(XReadParams xReadParams,
java.util.Map<java.lang.String,StreamEntryID> streams)
XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...]
|
java.util.Map<java.lang.String,java.util.List<StreamEntry>> |
xreadAsMap(XReadParams xReadParams,
java.util.Map<java.lang.String,StreamEntryID> streams)
XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...]
|
java.util.List<java.util.Map.Entry<byte[],java.util.List<StreamEntryBinary>>> |
xreadBinary(XReadParams xReadParams,
java.util.Map<byte[],StreamEntryID> streams)
Read from one or more streams.
|
java.util.Map<byte[],java.util.List<StreamEntryBinary>> |
xreadBinaryAsMap(XReadParams xReadParams,
java.util.Map<byte[],StreamEntryID> streams)
Read from one or more streams and return a map of stream name to list of entries.
|
java.util.List<java.lang.Object> |
xreadGroup(byte[] groupName,
byte[] consumer,
XReadGroupParams xReadGroupParams,
java.util.Map.Entry<byte[],byte[]>... streams)
Deprecated.
As of Jedis 6.1.0, use
xreadGroupBinary(byte[], byte[], XReadGroupParams, Map) or
xreadGroupBinaryAsMap(byte[], byte[], XReadGroupParams, Map) instead. |
java.util.List<java.util.Map.Entry<java.lang.String,java.util.List<StreamEntry>>> |
xreadGroup(java.lang.String groupName,
java.lang.String consumer,
XReadGroupParams xReadGroupParams,
java.util.Map<java.lang.String,StreamEntryID> streams)
XREADGROUP GROUP group consumer [COUNT count] [BLOCK milliseconds] [NOACK] STREAMS key [key ...] id [id ...]
|
java.util.Map<java.lang.String,java.util.List<StreamEntry>> |
xreadGroupAsMap(java.lang.String groupName,
java.lang.String consumer,
XReadGroupParams xReadGroupParams,
java.util.Map<java.lang.String,StreamEntryID> streams)
XREADGROUP GROUP group consumer [COUNT count] [BLOCK milliseconds] [NOACK] STREAMS key [key ...] id [id ...]
|
java.util.List<java.util.Map.Entry<byte[],java.util.List<StreamEntryBinary>>> |
xreadGroupBinary(byte[] groupName,
byte[] consumer,
XReadGroupParams xReadGroupParams,
java.util.Map<byte[],StreamEntryID> streams)
Read from one or more streams as a consumer group.
|
java.util.Map<byte[],java.util.List<StreamEntryBinary>> |
xreadGroupBinaryAsMap(byte[] groupName,
byte[] consumer,
XReadGroupParams xReadGroupParams,
java.util.Map<byte[],StreamEntryID> streams)
Read from one or more streams as a consumer group and return a map of stream name to list of
entries.
|
java.util.List<java.lang.Object> |
xrevrange(byte[] key,
byte[] end,
byte[] start) |
java.util.List<java.lang.Object> |
xrevrange(byte[] key,
byte[] end,
byte[] start,
int count) |
java.util.List<StreamEntry> |
xrevrange(java.lang.String key,
StreamEntryID end,
StreamEntryID start)
XREVRANGE key end start
|
java.util.List<StreamEntry> |
xrevrange(java.lang.String key,
StreamEntryID end,
StreamEntryID start,
int count)
XREVRANGE key end start COUNT count
|
java.util.List<StreamEntry> |
xrevrange(java.lang.String key,
java.lang.String end,
java.lang.String start) |
java.util.List<StreamEntry> |
xrevrange(java.lang.String key,
java.lang.String end,
java.lang.String start,
int count) |
long |
xtrim(byte[] key,
long maxLen,
boolean approximateLength) |
long |
xtrim(byte[] key,
XTrimParams params) |
long |
xtrim(java.lang.String key,
long maxLen,
boolean approximate)
XTRIM key MAXLEN [~] count
|
long |
xtrim(java.lang.String key,
XTrimParams params)
XTRIM key MAXLEN|MINID [=|~] threshold [LIMIT count]
|
long |
zadd(byte[] key,
double score,
byte[] member) |
long |
zadd(byte[] key,
double score,
byte[] member,
ZAddParams params) |
long |
zadd(byte[] key,
java.util.Map<byte[],java.lang.Double> scoreMembers) |
long |
zadd(byte[] key,
java.util.Map<byte[],java.lang.Double> scoreMembers,
ZAddParams params) |
long |
zadd(java.lang.String key,
double score,
java.lang.String member)
Add the specified member having the specified score to the sorted set stored at key.
|
long |
zadd(java.lang.String key,
double score,
java.lang.String member,
ZAddParams params)
Similar to
ZADD but can be used with optional params. |
long |
zadd(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Double> scoreMembers)
Similar to
ZADD but for multiple members. |
long |
zadd(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Double> scoreMembers,
ZAddParams params)
Similar to
ZADD but can be used with optional params,
and fits for multiple members. |
java.lang.Double |
zaddIncr(byte[] key,
double score,
byte[] member,
ZAddParams params) |
java.lang.Double |
zaddIncr(java.lang.String key,
double score,
java.lang.String member,
ZAddParams params)
Increments the score of member in the sorted set stored at key by increment.
|
long |
zcard(byte[] key) |
long |
zcard(java.lang.String key)
Return the sorted set cardinality (number of elements).
|
long |
zcount(byte[] key,
byte[] min,
byte[] max) |
long |
zcount(byte[] key,
double min,
double max) |
long |
zcount(java.lang.String key,
double min,
double max)
Return the number of elements in the sorted set at key with a score between min and max.
|
long |
zcount(java.lang.String key,
java.lang.String min,
java.lang.String max)
Similar to
ZCOUNT but with exclusive range. |
java.util.List<byte[]> |
zdiff(byte[]... keys) |
java.util.List<java.lang.String> |
zdiff(java.lang.String... keys)
Compute the difference between all the sets in the given keys.
|
long |
zdiffstore(byte[] dstkey,
byte[]... keys) |
long |
zdiffStore(byte[] dstkey,
byte[]... keys)
Deprecated.
|
long |
zdiffstore(java.lang.String dstkey,
java.lang.String... keys)
Compute the difference between all the sets in the given keys.
|
long |
zdiffStore(java.lang.String dstkey,
java.lang.String... keys)
Deprecated.
|
java.util.List<Tuple> |
zdiffWithScores(byte[]... keys) |
java.util.List<Tuple> |
zdiffWithScores(java.lang.String... keys)
Compute the difference between all the sets in the given keys.
|
double |
zincrby(byte[] key,
double increment,
byte[] member) |
java.lang.Double |
zincrby(byte[] key,
double increment,
byte[] member,
ZIncrByParams params) |
double |
zincrby(java.lang.String key,
double increment,
java.lang.String member)
If member already exists in the sorted set adds the increment to its score and updates the
position of the element in the sorted set accordingly.
|
java.lang.Double |
zincrby(java.lang.String key,
double increment,
java.lang.String member,
ZIncrByParams params)
Similar to
ZINCRBY but can be used with optionals params. |
java.util.List<byte[]> |
zinter(ZParams params,
byte[]... keys) |
java.util.List<java.lang.String> |
zinter(ZParams params,
java.lang.String... keys)
Compute the intersection between all the sets in the given keys.
|
long |
zintercard(byte[]... keys)
Similar to
ZINTER, but instead of returning the result set,
it returns just the cardinality of the result. |
long |
zintercard(long limit,
byte[]... keys)
Similar to
ZINTER, but instead of returning the result set,
it returns just the cardinality of the result. |
long |
zintercard(long limit,
java.lang.String... keys)
Similar to {@link SortedSetCommands#zinter(ZParams, String...)
|
long |
zintercard(java.lang.String... keys)
Similar to {@link SortedSetCommands#zinter(ZParams, String...)
|
long |
zinterstore(byte[] dstkey,
byte[]... sets) |
long |
zinterstore(byte[] dstkey,
ZParams params,
byte[]... sets) |
long |
zinterstore(java.lang.String dstkey,
java.lang.String... sets)
Compute the intersection between all the sets in the given keys.
|
long |
zinterstore(java.lang.String dstkey,
ZParams params,
java.lang.String... sets)
Compute the intersection between all the sets in the given keys.
|
java.util.List<Tuple> |
zinterWithScores(ZParams params,
byte[]... keys) |
java.util.List<Tuple> |
zinterWithScores(ZParams params,
java.lang.String... keys)
Compute the intersection between all the sets in the given keys.
|
long |
zlexcount(byte[] key,
byte[] min,
byte[] max) |
long |
zlexcount(java.lang.String key,
java.lang.String min,
java.lang.String max)
Return the number of elements in the sorted set at key with a value between min and max, when all
the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.
|
KeyValue<byte[],java.util.List<Tuple>> |
zmpop(SortedSetOption option,
byte[]... keys) |
KeyValue<byte[],java.util.List<Tuple>> |
zmpop(SortedSetOption option,
int count,
byte[]... keys) |
KeyValue<java.lang.String,java.util.List<Tuple>> |
zmpop(SortedSetOption option,
int count,
java.lang.String... keys) |
KeyValue<java.lang.String,java.util.List<Tuple>> |
zmpop(SortedSetOption option,
java.lang.String... keys) |
java.util.List<java.lang.Double> |
zmscore(byte[] key,
byte[]... members) |
java.util.List<java.lang.Double> |
zmscore(java.lang.String key,
java.lang.String... members)
Return the scores associated with the specified members in the sorted set stored at key.
|
Tuple |
zpopmax(byte[] key) |
java.util.List<Tuple> |
zpopmax(byte[] key,
int count) |
Tuple |
zpopmax(java.lang.String key)
Remove and return the member with the highest score in the sorted set stored at key.
|
java.util.List<Tuple> |
zpopmax(java.lang.String key,
int count)
Remove and return up to count members with the highest scores in the sorted set stored at key.
|
Tuple |
zpopmin(byte[] key) |
java.util.List<Tuple> |
zpopmin(byte[] key,
int count) |
Tuple |
zpopmin(java.lang.String key)
Remove and return the member with the lowest score in the sorted set stored at key.
|
java.util.List<Tuple> |
zpopmin(java.lang.String key,
int count)
Remove and return up to count members with the lowest scores in the sorted set stored at key.
|
byte[] |
zrandmember(byte[] key) |
java.util.List<byte[]> |
zrandmember(byte[] key,
long count) |
java.lang.String |
zrandmember(java.lang.String key)
Return a random element from the sorted set value stored at key.
|
java.util.List<java.lang.String> |
zrandmember(java.lang.String key,
long count)
Return an array of distinct elements.
|
java.util.List<Tuple> |
zrandmemberWithScores(byte[] key,
long count) |
java.util.List<Tuple> |
zrandmemberWithScores(java.lang.String key,
long count)
Similar to
ZRANDMEMBER but the replay will
include the scores with the result. |
java.util.List<byte[]> |
zrange(byte[] key,
long start,
long stop) |
java.util.List<byte[]> |
zrange(byte[] key,
ZRangeParams zRangeParams) |
java.util.List<java.lang.String> |
zrange(java.lang.String key,
long start,
long stop)
Returns the specified range of elements in the sorted set stored at key.
|
java.util.List<java.lang.String> |
zrange(java.lang.String key,
ZRangeParams zRangeParams)
Similar to
ZRANGE but can be used with additional params. |
java.util.List<byte[]> |
zrangeByLex(byte[] key,
byte[] min,
byte[] max) |
java.util.List<byte[]> |
zrangeByLex(byte[] key,
byte[] min,
byte[] max,
int offset,
int count) |
java.util.List<java.lang.String> |
zrangeByLex(java.lang.String key,
java.lang.String min,
java.lang.String max)
Return all the elements in the sorted set at key with a value between min and max, when all
the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.
|
java.util.List<java.lang.String> |
zrangeByLex(java.lang.String key,
java.lang.String min,
java.lang.String max,
int offset,
int count)
Similar to
ZRANGE but with limit option. |
java.util.List<byte[]> |
zrangeByScore(byte[] key,
byte[] min,
byte[] max) |
java.util.List<byte[]> |
zrangeByScore(byte[] key,
byte[] min,
byte[] max,
int offset,
int count) |
java.util.List<byte[]> |
zrangeByScore(byte[] key,
double min,
double max) |
java.util.List<byte[]> |
zrangeByScore(byte[] key,
double min,
double max,
int offset,
int count) |
java.util.List<java.lang.String> |
zrangeByScore(java.lang.String key,
double min,
double max)
Return all the elements in the sorted set at key with a score between min and max
(including elements with score equal to min or max).
|
java.util.List<java.lang.String> |
zrangeByScore(java.lang.String key,
double min,
double max,
int offset,
int count)
Similar to
ZRANGE but with exclusive range. |
java.util.List<java.lang.String> |
zrangeByScore(java.lang.String key,
java.lang.String min,
java.lang.String max)
Similar to
ZRANGE but with exclusive range. |
java.util.List<java.lang.String> |
zrangeByScore(java.lang.String key,
java.lang.String min,
java.lang.String max,
int offset,
int count)
Similar to
ZRANGE but with limit option, |
java.util.List<Tuple> |
zrangeByScoreWithScores(byte[] key,
byte[] min,
byte[] max) |
java.util.List<Tuple> |
zrangeByScoreWithScores(byte[] key,
byte[] min,
byte[] max,
int offset,
int count) |
java.util.List<Tuple> |
zrangeByScoreWithScores(byte[] key,
double min,
double max) |
java.util.List<Tuple> |
zrangeByScoreWithScores(byte[] key,
double min,
double max,
int offset,
int count) |
java.util.List<Tuple> |
zrangeByScoreWithScores(java.lang.String key,
double min,
double max)
Similar to
ZRANGE but return with scores. |
java.util.List<Tuple> |
zrangeByScoreWithScores(java.lang.String key,
double min,
double max,
int offset,
int count)
Similar to
ZRANGE but with limit option,
and return with scores. |
java.util.List<Tuple> |
zrangeByScoreWithScores(java.lang.String key,
java.lang.String min,
java.lang.String max)
Similar to
ZRANGE but with exclusive range,
and return with scores. |
java.util.List<Tuple> |
zrangeByScoreWithScores(java.lang.String key,
java.lang.String min,
java.lang.String max,
int offset,
int count)
Similar to
ZRANGE but with exclusive range,
with limit options and return with scores. |
long |
zrangestore(byte[] dest,
byte[] src,
ZRangeParams zRangeParams) |
long |
zrangestore(java.lang.String dest,
java.lang.String src,
ZRangeParams zRangeParams)
Similar to
ZRANGE but stores the result in dest. |
java.util.List<Tuple> |
zrangeWithScores(byte[] key,
long start,
long stop) |
java.util.List<Tuple> |
zrangeWithScores(byte[] key,
ZRangeParams zRangeParams) |
java.util.List<Tuple> |
zrangeWithScores(java.lang.String key,
long start,
long stop)
Returns the specified range of elements in the sorted set stored at key with the scores.
|
java.util.List<Tuple> |
zrangeWithScores(java.lang.String key,
ZRangeParams zRangeParams)
Similar to
ZRANGE but can be used with additional params. |
java.lang.Long |
zrank(byte[] key,
byte[] member) |
java.lang.Long |
zrank(java.lang.String key,
java.lang.String member)
Return the rank (or index) of member in the sorted set at key, with scores being ordered from
low to high.
|
KeyValue<java.lang.Long,java.lang.Double> |
zrankWithScore(byte[] key,
byte[] member) |
KeyValue<java.lang.Long,java.lang.Double> |
zrankWithScore(java.lang.String key,
java.lang.String member)
Returns the rank and the score of member in the sorted set stored at key, with the scores
ordered from low to high.
|
long |
zrem(byte[] key,
byte[]... members) |
long |
zrem(java.lang.String key,
java.lang.String... members)
Remove the specified member from the sorted set value stored at key.
|
long |
zremrangeByLex(byte[] key,
byte[] min,
byte[] max) |
long |
zremrangeByLex(java.lang.String key,
java.lang.String min,
java.lang.String max)
Remove all elements in the sorted set stored at key between the lexicographical range specified by min and max,
when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.
|
long |
zremrangeByRank(byte[] key,
long start,
long stop) |
long |
zremrangeByRank(java.lang.String key,
long start,
long stop)
Remove all elements in the sorted set at key with rank between start and end.
|
long |
zremrangeByScore(byte[] key,
byte[] min,
byte[] max) |
long |
zremrangeByScore(byte[] key,
double min,
double max) |
long |
zremrangeByScore(java.lang.String key,
double min,
double max)
Remove all the elements in the sorted set at key with a score between min and max (including
elements with score equal to min or max).
|
long |
zremrangeByScore(java.lang.String key,
java.lang.String min,
java.lang.String max)
Similar to
ZREMRANGE but with limit option. |
java.util.List<byte[]> |
zrevrange(byte[] key,
long start,
long stop) |
java.util.List<java.lang.String> |
zrevrange(java.lang.String key,
long start,
long stop)
Returns the specified range of elements in the sorted set stored at key.
|
java.util.List<byte[]> |
zrevrangeByLex(byte[] key,
byte[] max,
byte[] min) |
java.util.List<byte[]> |
zrevrangeByLex(byte[] key,
byte[] max,
byte[] min,
int offset,
int count) |
java.util.List<java.lang.String> |
zrevrangeByLex(java.lang.String key,
java.lang.String max,
java.lang.String min)
Return all the elements in the sorted set at key with a value between max and min, when all
the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.
|
java.util.List<java.lang.String> |
zrevrangeByLex(java.lang.String key,
java.lang.String max,
java.lang.String min,
int offset,
int count)
Similar to
ZRANGE but with limit option. |
java.util.List<byte[]> |
zrevrangeByScore(byte[] key,
byte[] max,
byte[] min) |
java.util.List<byte[]> |
zrevrangeByScore(byte[] key,
byte[] max,
byte[] min,
int offset,
int count) |
java.util.List<byte[]> |
zrevrangeByScore(byte[] key,
double max,
double min) |
java.util.List<byte[]> |
zrevrangeByScore(byte[] key,
double max,
double min,
int offset,
int count) |
java.util.List<java.lang.String> |
zrevrangeByScore(java.lang.String key,
double max,
double min)
Return all the elements in the sorted set at key with a score between max and min
(including elements with score equal to max or min).
|
java.util.List<java.lang.String> |
zrevrangeByScore(java.lang.String key,
double max,
double min,
int offset,
int count)
Similar to
ZRANGE but with limit option, |
java.util.List<java.lang.String> |
zrevrangeByScore(java.lang.String key,
java.lang.String max,
java.lang.String min)
Similar to
ZREVRANGE but with exclusive range. |
java.util.List<java.lang.String> |
zrevrangeByScore(java.lang.String key,
java.lang.String max,
java.lang.String min,
int offset,
int count)
Similar to
ZREVRANGE but with limit option, |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(byte[] key,
byte[] max,
byte[] min) |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(byte[] key,
byte[] max,
byte[] min,
int offset,
int count) |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(byte[] key,
double max,
double min) |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(byte[] key,
double max,
double min,
int offset,
int count) |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(java.lang.String key,
double max,
double min)
Similar to
ZREVRANGE but return with scores. |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(java.lang.String key,
double max,
double min,
int offset,
int count)
Similar to
ZREVRANGE but with
limit options and return with scores. |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(java.lang.String key,
java.lang.String max,
java.lang.String min)
Similar to
ZREVRANGE but with exclusive range,
and return with scores. |
java.util.List<Tuple> |
zrevrangeByScoreWithScores(java.lang.String key,
java.lang.String max,
java.lang.String min,
int offset,
int count)
Similar to
ZREVRANGE but with
exclusive range, with limit options and return with scores. |
java.util.List<Tuple> |
zrevrangeWithScores(byte[] key,
long start,
long stop) |
java.util.List<Tuple> |
zrevrangeWithScores(java.lang.String key,
long start,
long stop)
Similar to
ZREVRANGE but the reply will
include the scores of the returned elements. |
java.lang.Long |
zrevrank(byte[] key,
byte[] member) |
java.lang.Long |
zrevrank(java.lang.String key,
java.lang.String member)
Return the rank (or index) of member in the sorted set at key, with scores being ordered from
high to low.
|
KeyValue<java.lang.Long,java.lang.Double> |
zrevrankWithScore(byte[] key,
byte[] member) |
KeyValue<java.lang.Long,java.lang.Double> |
zrevrankWithScore(java.lang.String key,
java.lang.String member)
Returns the rank and the score of member in the sorted set stored at key, with the scores
ordered from high to low.
|
ScanResult<Tuple> |
zscan(byte[] key,
byte[] cursor,
ScanParams params) |
ScanResult<Tuple> |
zscan(java.lang.String key,
java.lang.String cursor,
ScanParams params) |
java.lang.Double |
zscore(byte[] key,
byte[] member) |
java.lang.Double |
zscore(java.lang.String key,
java.lang.String member)
Return the score of the specified element of the sorted set at key.
|
java.util.List<byte[]> |
zunion(ZParams params,
byte[]... keys) |
java.util.List<java.lang.String> |
zunion(ZParams params,
java.lang.String... keys)
Compute the union between all the sets in the given keys.
|
long |
zunionstore(byte[] dstkey,
byte[]... sets) |
long |
zunionstore(byte[] dstkey,
ZParams params,
byte[]... sets) |
long |
zunionstore(java.lang.String dstkey,
java.lang.String... sets)
Compute the union between all the sets in the given keys.
|
long |
zunionstore(java.lang.String dstkey,
ZParams params,
java.lang.String... sets)
Compute the union between all the sets in the given keys.
|
java.util.List<Tuple> |
zunionWithScores(ZParams params,
byte[]... keys) |
java.util.List<Tuple> |
zunionWithScores(ZParams params,
java.lang.String... keys)
Compute the union between all the sets in the given keys.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithscan, hscanNoValuessscanzscanxaddhscan, hscanNoValuessscanzscanxaddftAlter, ftAlter, ftCreate, ftCreate, ftCreate, ftSearchjsonMGet, jsonSetLegacy, jsonSetLegacyjsonMGet, jsonSet, jsonSet, jsonSetWithEscape, jsonSetWithEscapecmsIncrBytopkIncrBy@Deprecated protected RedisProtocol protocol
protected final ConnectionProvider provider
protected final CommandExecutor executor
protected final CommandObjects commandObjects
public UnifiedJedis()
public UnifiedJedis(HostAndPort hostAndPort)
public UnifiedJedis(java.lang.String url)
public UnifiedJedis(java.net.URI uri)
public UnifiedJedis(java.net.URI uri,
JedisClientConfig config)
uri - The URI to connect toconfig - The JedisClientConfig object to usepublic UnifiedJedis(HostAndPort hostAndPort, JedisClientConfig clientConfig)
@Experimental public UnifiedJedis(HostAndPort hostAndPort, JedisClientConfig clientConfig, CacheConfig cacheConfig)
@Experimental public UnifiedJedis(HostAndPort hostAndPort, JedisClientConfig clientConfig, Cache cache)
public UnifiedJedis(ConnectionProvider provider)
protected UnifiedJedis(ConnectionProvider provider, RedisProtocol protocol)
@Experimental protected UnifiedJedis(ConnectionProvider provider, RedisProtocol protocol, Cache cache)
public UnifiedJedis(JedisSocketFactory socketFactory)
JedisSocketFactory.
WARNING: Using this constructor means a NullPointerException will be occurred if
provider is accessed.
public UnifiedJedis(JedisSocketFactory socketFactory, JedisClientConfig clientConfig)
JedisSocketFactory.
WARNING: Using this constructor means a NullPointerException will be occurred if
provider is accessed.
public UnifiedJedis(Connection connection)
Connection.
WARNING: Using this constructor means a NullPointerException will be occurred if
provider is accessed.
@Deprecated public UnifiedJedis(ClusterConnectionProvider provider, int maxAttempts, java.time.Duration maxTotalRetriesDuration)
@Deprecated protected UnifiedJedis(ClusterConnectionProvider provider, int maxAttempts, java.time.Duration maxTotalRetriesDuration, RedisProtocol protocol)
@Deprecated protected UnifiedJedis(ClusterConnectionProvider provider, int maxAttempts, java.time.Duration maxTotalRetriesDuration, RedisProtocol protocol, Cache cache)
public UnifiedJedis(ConnectionProvider provider, int maxAttempts, java.time.Duration maxTotalRetriesDuration)
public UnifiedJedis(CommandExecutor executor)
CommandExecutor.
WARNING: Using this constructor means a NullPointerException will be occurred if
provider is accessed.
@VisibleForTesting public UnifiedJedis(CommandExecutor executor, ConnectionProvider provider, CommandObjects commandObjects)
public void close()
close in interface java.lang.AutoCloseable@Deprecated protected final void setProtocol(RedisProtocol protocol)
public final <T> T executeCommand(CommandObject<T> commandObject)
public final <T> T broadcastCommand(CommandObject<T> commandObject)
public void setBroadcastAndRoundRobinConfig(JedisBroadcastAndRoundRobinConfig config)
public Cache getCache()
public java.lang.String ping()
public java.lang.String echo(java.lang.String string)
public java.lang.String flushDB()
public java.lang.String flushAll()
public java.lang.String configSet(java.lang.String parameter,
java.lang.String value)
public java.lang.String info()
public java.lang.String info(java.lang.String section)
public boolean exists(java.lang.String key)
KeyCommandsTime complexity: O(1)
exists in interface KeyCommandstrue if the key exists, false otherwisepublic long exists(java.lang.String... keys)
KeyCommandsTime complexity: O(N)
exists in interface KeyCommandskeys.public long persist(java.lang.String key)
KeyCommandspersist in interface KeyCommandspublic java.lang.String type(java.lang.String key)
KeyCommandsTime complexity: O(1)
type in interface KeyCommandspublic boolean exists(byte[] key)
exists in interface KeyBinaryCommandspublic long exists(byte[]... keys)
exists in interface KeyBinaryCommandspublic long persist(byte[] key)
persist in interface KeyBinaryCommandspublic java.lang.String type(byte[] key)
type in interface KeyBinaryCommandspublic byte[] dump(java.lang.String key)
KeyCommandsTime complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.
dump in interface KeyCommandspublic java.lang.String restore(java.lang.String key,
long ttl,
byte[] serializedValue)
KeyCommandsDUMP).
Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.
restore in interface KeyCommandsttl - If ttl is 0 the key is created without any expire, otherwise the specified expire
time (in milliseconds) is set.public java.lang.String restore(java.lang.String key,
long ttl,
byte[] serializedValue,
RestoreParams params)
KeyCommandsDUMP).
Time complexity: O(1) to access the key and additional O(N*M) to serialize it where N is the number of Redis objects composing the value and M their average size.
restore in interface KeyCommandsttl - If ttl is 0 the key is created without any expire, otherwise the specified expire
time (in milliseconds) is set.params - RestoreParamspublic byte[] dump(byte[] key)
dump in interface KeyBinaryCommandspublic java.lang.String restore(byte[] key,
long ttl,
byte[] serializedValue)
restore in interface KeyBinaryCommandspublic java.lang.String restore(byte[] key,
long ttl,
byte[] serializedValue,
RestoreParams params)
restore in interface KeyBinaryCommandspublic long expire(java.lang.String key,
long seconds)
KeyCommandsVolatile keys are stored on disk like the other keys, the timeout is persistent too like all the other aspects of the dataset. Saving a dataset containing expires and stopping the server does not stop the flow of time as Redis stores on disk the time when the key will no longer be available as Unix time, and not the remaining seconds.
Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire
set. It is also possible to undo the expire at all turning the key into a normal key using the
PERSIST command.
Time complexity: O(1)
expire in interface KeyCommandsseconds - time to expirepublic long expire(java.lang.String key,
long seconds,
ExpiryOption expiryOption)
KeyCommandsEXPIRE but with optional expiry setting.expire in interface KeyCommandsseconds - time to expireexpiryOption - can be NX, XX, GT or LTKeyCommands.expire(String, long)public long pexpire(java.lang.String key,
long milliseconds)
KeyCommandsEXPIRE but the time
to live of the key is specified in milliseconds instead of seconds.
Time complexity: O(1)
pexpire in interface KeyCommandsmilliseconds - time to expirepublic long pexpire(java.lang.String key,
long milliseconds,
ExpiryOption expiryOption)
KeyCommandsEXPIRE but with optional expiry setting.pexpire in interface KeyCommandsmilliseconds - time to expireexpiryOption - can be NX, XX, GT or LTKeyCommands.pexpire(String, long)public long expireTime(java.lang.String key)
KeyCommandsThe command returns -1 if the key exists but has no associated expiration time, and -2 if the key does not exist.
Time complexity: O(1)
expireTime in interface KeyCommandspublic long pexpireTime(java.lang.String key)
KeyCommandsEXPIRETIME but returns the absolute Unix expiration
timestamp in milliseconds instead of seconds.
Time complexity: O(1)
pexpireTime in interface KeyCommandsKeyCommands.expireTime(String)public long expireAt(java.lang.String key,
long unixTime)
KeyCommandsEXPIRE but instead to get the
number of seconds representing the Time To Live of the key as a second argument (that is a
relative way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp
(Number of seconds elapsed since 1 Gen 1970).
EXPIREAT was introduced in order to implement the Append Only File persistence mode so that EXPIRE commands are automatically translated into EXPIREAT commands for the append only file. Of course EXPIREAT can also used by programmers that need a way to simply specify that a given key should expire at a given time in the future.
Time complexity: O(1)
expireAt in interface KeyCommandsunixTime - time to expirepublic long expireAt(java.lang.String key,
long unixTime,
ExpiryOption expiryOption)
KeyCommandsexpireAt in interface KeyCommandsunixTime - time to expireexpiryOption - can be NX, XX, GT or LTKeyCommands.expireAt(String, long)public long pexpireAt(java.lang.String key,
long millisecondsTimestamp)
KeyCommandsEXPIREAT but
Unix time at which the key will expire is specified in milliseconds instead of seconds.
Time complexity: O(1)
pexpireAt in interface KeyCommandsmillisecondsTimestamp - time to expirepublic long pexpireAt(java.lang.String key,
long millisecondsTimestamp,
ExpiryOption expiryOption)
KeyCommandspexpireAt in interface KeyCommandsmillisecondsTimestamp - time to expireexpiryOption - can be NX, XX, GT or LTKeyCommands.pexpireAt(String, long)public long expire(byte[] key,
long seconds)
expire in interface KeyBinaryCommandspublic long expire(byte[] key,
long seconds,
ExpiryOption expiryOption)
expire in interface KeyBinaryCommandspublic long pexpire(byte[] key,
long milliseconds)
pexpire in interface KeyBinaryCommandspublic long pexpire(byte[] key,
long milliseconds,
ExpiryOption expiryOption)
pexpire in interface KeyBinaryCommandspublic long expireTime(byte[] key)
expireTime in interface KeyBinaryCommandspublic long pexpireTime(byte[] key)
pexpireTime in interface KeyBinaryCommandspublic long expireAt(byte[] key,
long unixTime)
expireAt in interface KeyBinaryCommandspublic long expireAt(byte[] key,
long unixTime,
ExpiryOption expiryOption)
expireAt in interface KeyBinaryCommandspublic long pexpireAt(byte[] key,
long millisecondsTimestamp)
pexpireAt in interface KeyBinaryCommandspublic long pexpireAt(byte[] key,
long millisecondsTimestamp,
ExpiryOption expiryOption)
pexpireAt in interface KeyBinaryCommandspublic long ttl(java.lang.String key)
KeyCommandsEXPIRE set. This introspection capability allows a Redis
connection to check how many seconds a given key will continue to be part of the dataset.
Time complexity: O(1)
ttl in interface KeyCommandspublic long pttl(java.lang.String key)
KeyCommandsEXPIRE set.
Time complexity: O(1)
pttl in interface KeyCommandspublic long touch(java.lang.String key)
KeyCommandsTime complexity: O(N) where N is the number of keys that will be touched.
touch in interface KeyCommandspublic long touch(java.lang.String... keys)
KeyCommandsTime complexity: O(N) where N is the number of keys that will be touched.
touch in interface KeyCommandspublic long ttl(byte[] key)
ttl in interface KeyBinaryCommandspublic long pttl(byte[] key)
pttl in interface KeyBinaryCommandspublic long touch(byte[] key)
touch in interface KeyBinaryCommandspublic long touch(byte[]... keys)
touch in interface KeyBinaryCommandspublic java.util.List<java.lang.String> sort(java.lang.String key)
KeyCommandsSort the elements contained in the List, Set, or Sorted Set values at key. By default, sorting is numeric with elements being compared as double precision floating point numbers. This is the simplest form of SORT.
sort in interface KeyCommandsKeyCommands.sort(String, SortingParams)public java.util.List<java.lang.String> sort(java.lang.String key,
SortingParams sortingParams)
KeyCommandsexamples:
Given are the following sets and key/values:
x = [1, 2, 3] y = [a, b, c] k1 = z k2 = y k3 = x w1 = 9 w2 = 8 w3 = 7Sort Order:
sort(x) or sort(x, sp.asc()) -> [1, 2, 3] sort(x, sp.desc()) -> [3, 2, 1] sort(y) -> [c, a, b] sort(y, sp.alpha()) -> [a, b, c] sort(y, sp.alpha().desc()) -> [c, a, b]Limit (e.g. for Pagination):
sort(x, sp.limit(0, 2)) -> [1, 2] sort(y, sp.alpha().desc().limit(1, 2)) -> [b, a]Sorting by external keys:
sort(x, sb.by(w*)) -> [3, 2, 1] sort(x, sb.by(w*).desc()) -> [1, 2, 3]Getting external keys:
sort(x, sp.by(w*).get(k*)) -> [x, y, z] sort(x, sp.by(w*).get(#).get(k*)) -> [3, x, 2, y, 1, z]
sort in interface KeyCommandssortingParams - SortingParamspublic long sort(java.lang.String key,
java.lang.String dstkey)
KeyCommandsSORT but store the result in dstkey.sort in interface KeyCommandsKeyCommands.sort(String)public long sort(java.lang.String key,
SortingParams sortingParams,
java.lang.String dstkey)
KeyCommandsSORT but store the result in dstkey.sort in interface KeyCommandssortingParams - SortingParamsKeyCommands.sort(String, SortingParams)public java.util.List<java.lang.String> sortReadonly(java.lang.String key,
SortingParams sortingParams)
KeyCommandsSORT command.
It is exactly like the original SORT but refuses the STORE option and can safely be used in read-only replicas.sortReadonly in interface KeyCommandskey - the key to sortsortingParams - SortingParamspublic java.util.List<byte[]> sort(byte[] key)
sort in interface KeyBinaryCommandspublic java.util.List<byte[]> sort(byte[] key,
SortingParams sortingParams)
sort in interface KeyBinaryCommandspublic long sort(byte[] key,
byte[] dstkey)
sort in interface KeyBinaryCommandspublic java.util.List<byte[]> sortReadonly(byte[] key,
SortingParams sortingParams)
sortReadonly in interface KeyBinaryCommandspublic long sort(byte[] key,
SortingParams sortingParams,
byte[] dstkey)
sort in interface KeyBinaryCommandspublic long del(java.lang.String key)
KeyCommandsTime complexity: O(1)
del in interface KeyCommandspublic long del(java.lang.String... keys)
KeyCommandsTime complexity: O(N)
del in interface KeyCommandspublic long unlink(java.lang.String key)
KeyCommandsDEL: it removes the specified key.
Just like DEL a key is ignored if it does not exist. However, the command performs the actual
memory reclaiming in a different thread, so it is not blocking, while DEL is. This is where the
command name comes from: the command just unlinks the keys from the keyspace. The actual removal
will happen later asynchronously.
Time complexity: O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.
unlink in interface KeyCommandspublic long unlink(java.lang.String... keys)
KeyCommandsSORT but can be used with multiple keys.unlink in interface KeyCommandsKeyCommands.unlink(String)public long del(byte[] key)
del in interface KeyBinaryCommandspublic long del(byte[]... keys)
del in interface KeyBinaryCommandspublic long unlink(byte[] key)
unlink in interface KeyBinaryCommandspublic long unlink(byte[]... keys)
unlink in interface KeyBinaryCommandspublic java.lang.Long memoryUsage(java.lang.String key)
KeyCommandsTime complexity: O(1)
memoryUsage in interface KeyCommandspublic java.lang.Long memoryUsage(java.lang.String key,
int samples)
KeyCommandsTime complexity: O(1)
memoryUsage in interface KeyCommandssamples - the number of sampled nested values. By default, this option is set to 5.
To sample the all the nested values, use 0.public java.lang.Long memoryUsage(byte[] key)
memoryUsage in interface KeyBinaryCommandspublic java.lang.Long memoryUsage(byte[] key,
int samples)
memoryUsage in interface KeyBinaryCommandspublic boolean copy(java.lang.String srcKey,
java.lang.String dstKey,
boolean replace)
KeyCommandscopy in interface KeyCommandssrcKey - the source key.dstKey - the destination key.replace - removes the destination key before copying the value to it, in order to avoid error.true if source was copied, false otherwisepublic java.lang.String rename(java.lang.String oldkey,
java.lang.String newkey)
KeyCommandsoldkey to newkey. If the source and destination name are the same an
error is returned. If newkey already exists it is overwritten.
Time complexity: O(1)
rename in interface KeyCommandspublic long renamenx(java.lang.String oldkey,
java.lang.String newkey)
KeyCommandsTime complexity: O(1)
renamenx in interface KeyCommandspublic boolean copy(byte[] srcKey,
byte[] dstKey,
boolean replace)
copy in interface KeyBinaryCommandspublic java.lang.String rename(byte[] oldkey,
byte[] newkey)
rename in interface KeyBinaryCommandspublic long renamenx(byte[] oldkey,
byte[] newkey)
renamenx in interface KeyBinaryCommandspublic long dbSize()
public java.util.Set<java.lang.String> keys(java.lang.String pattern)
KeyCommandsNote that while the time complexity for this operation is O(n) the constant times are pretty low. For example Redis running on an entry level laptop can scan a 1 million keys database in 40 milliseconds. Still it's better to consider this one of the slow commands that may ruin the DB performance if not used with care.
In other words this command is intended only for debugging and special operations like creating a script to change the DB schema. Don't use it in your normal code. Use Redis Sets in order to group together a subset of objects.
Glob style patterns examples:
Use \ to escape special chars if you want to match them verbatim.
Time complexity: O(n) (with n being the number of keys in the DB, and assuming keys and pattern of limited length)
keys in interface KeyCommandspublic ScanResult<java.lang.String> scan(java.lang.String cursor)
scan in interface KeyCommandspublic ScanResult<java.lang.String> scan(java.lang.String cursor, ScanParams params)
scan in interface KeyCommandspublic ScanResult<java.lang.String> scan(java.lang.String cursor, ScanParams params, java.lang.String type)
scan in interface KeyCommandspublic ScanIteration scanIteration(int batchCount, java.lang.String match)
batchCount - COUNT for each batch executionmatch - patternpublic ScanIteration scanIteration(int batchCount, java.lang.String match, java.lang.String type)
batchCount - COUNT for each batch executionmatch - patterntype - key typepublic java.util.Set<byte[]> keys(byte[] pattern)
keys in interface KeyBinaryCommandspublic ScanResult<byte[]> scan(byte[] cursor)
scan in interface KeyBinaryCommandspublic ScanResult<byte[]> scan(byte[] cursor, ScanParams params)
scan in interface KeyBinaryCommandspublic ScanResult<byte[]> scan(byte[] cursor, ScanParams params, byte[] type)
scan in interface KeyBinaryCommandspublic java.lang.String randomKey()
KeyCommandsTime complexity: O(1)
randomKey in interface KeyCommandsnil when the database is emptypublic byte[] randomBinaryKey()
randomBinaryKey in interface KeyBinaryCommandspublic java.lang.String set(java.lang.String key,
java.lang.String value)
StringCommandsTime complexity: O(1)
set in interface StringCommandspublic java.lang.String set(java.lang.String key,
java.lang.String value,
SetParams params)
StringCommandsTime complexity: O(1)
set in interface StringCommandsparams - SetParamsOK if SET was executed correctly, or null
if the SET operation was not performed because the user specified the NX or XX option
but the condition was not met.public java.lang.String get(java.lang.String key)
StringCommandsTime complexity: O(1)
get in interface StringCommandspublic java.lang.String setGet(java.lang.String key,
java.lang.String value)
setGet in interface StringCommandspublic java.lang.String setGet(java.lang.String key,
java.lang.String value,
SetParams params)
setGet in interface StringCommandspublic java.lang.String getDel(java.lang.String key)
StringCommandsTime complexity: O(1)
getDel in interface StringCommandspublic java.lang.String getEx(java.lang.String key,
GetExParams params)
StringCommandsGET,
but is a write command with additional options:
EX seconds -- Set the specified expire time, in seconds.
PX milliseconds -- Set the specified expire time, in milliseconds.
EXAT timestamp-seconds -- Set the specified Unix time at which the key will expire, in seconds.
PXAT timestamp-milliseconds -- Set the specified Unix time at which the key will expire, in milliseconds.
PERSIST -- Remove the time to live associated with the key.
Time complexity: O(1)
getEx in interface StringCommandsparams - GetExParamspublic java.lang.String set(byte[] key,
byte[] value)
set in interface StringBinaryCommandspublic java.lang.String set(byte[] key,
byte[] value,
SetParams params)
set in interface StringBinaryCommandspublic byte[] get(byte[] key)
get in interface StringBinaryCommandspublic byte[] setGet(byte[] key,
byte[] value)
setGet in interface StringBinaryCommandspublic byte[] setGet(byte[] key,
byte[] value,
SetParams params)
setGet in interface StringBinaryCommandspublic byte[] getDel(byte[] key)
getDel in interface StringBinaryCommandspublic byte[] getEx(byte[] key,
GetExParams params)
getEx in interface StringBinaryCommandspublic boolean setbit(java.lang.String key,
long offset,
boolean value)
BitCommandsTime complexity: O(1)
setbit in interface BitCommandspublic boolean getbit(java.lang.String key,
long offset)
BitCommandsTime complexity: O(1)
getbit in interface BitCommandspublic long setrange(java.lang.String key,
long offset,
java.lang.String value)
StringCommandsTime complexity: O(1)
setrange in interface StringCommandspublic java.lang.String getrange(java.lang.String key,
long startOffset,
long endOffset)
StringCommandsTime complexity: O(N) where N is the length of the returned string
getrange in interface StringCommandspublic boolean setbit(byte[] key,
long offset,
boolean value)
setbit in interface BitBinaryCommandspublic boolean getbit(byte[] key,
long offset)
getbit in interface BitBinaryCommandspublic long setrange(byte[] key,
long offset,
byte[] value)
setrange in interface StringBinaryCommandspublic byte[] getrange(byte[] key,
long startOffset,
long endOffset)
getrange in interface StringBinaryCommands@Deprecated
public java.lang.String getSet(java.lang.String key,
java.lang.String value)
setGet(java.lang.String, java.lang.String).StringCommandsTime complexity: O(1)
getSet in interface StringCommandspublic long setnx(java.lang.String key,
java.lang.String value)
StringCommandsSET with the only difference that if
the key already exists no operation is performed. SETNX actually means "SET if Not Exists".
Time complexity: O(1)
setnx in interface StringCommandspublic java.lang.String setex(java.lang.String key,
long seconds,
java.lang.String value)
StringCommandsSET + EXPIRE.
The operation is atomic.
Time complexity: O(1)
setex in interface StringCommandspublic java.lang.String psetex(java.lang.String key,
long milliseconds,
java.lang.String value)
StringCommandsSETEX with the sole difference
that the expire time is specified in milliseconds instead of seconds.
Time complexity: O(1)
psetex in interface StringCommands@Deprecated
public byte[] getSet(byte[] key,
byte[] value)
setGet(byte[], byte[]).getSet in interface StringBinaryCommandspublic long setnx(byte[] key,
byte[] value)
setnx in interface StringBinaryCommandspublic java.lang.String setex(byte[] key,
long seconds,
byte[] value)
setex in interface StringBinaryCommandspublic java.lang.String psetex(byte[] key,
long milliseconds,
byte[] value)
psetex in interface StringBinaryCommandspublic long incr(java.lang.String key)
StringCommandsINCR commands are limited to 64-bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64-bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
incr in interface StringCommandskey - the key to incrementpublic long incrBy(java.lang.String key,
long increment)
StringCommandsINCR but instead to increment by 1 the
increment is integer.
INCR commands are limited to 64-bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64-bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
incrBy in interface StringCommandskey - the key to incrementincrement - the value to increment bypublic double incrByFloat(java.lang.String key,
double increment)
StringCommandsStringCommands.incrBy(String, long) INCRBY} but increments by floats
instead of integers.
INCRBYFLOAT commands are limited to double precision floating point values.
Note: this is actually a string operation, that is, in Redis there are not "double" types. Simply the string stored at the key is parsed as a base double precision floating point value, incremented, and then converted back as a string. There is no DECRYBYFLOAT but providing a negative value will work as expected.
Time complexity: O(1)
incrByFloat in interface StringCommandskey - the key to incrementincrement - the value to increment bypublic long decr(java.lang.String key)
StringCommandsDECR commands are limited to 64-bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64-bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
decr in interface StringCommandskey - the key to decrementpublic long decrBy(java.lang.String key,
long decrement)
StringCommandsDECR but instead to decrement by 1 the
decrement is integer.
DECRBY commands are limited to 64-bit signed integers.
Note: this is actually a string operation, that is, in Redis there are not "integer" types. Simply the string stored at the key is parsed as a base 10 64-bit signed integer, incremented, and then converted back as a string.
Time complexity: O(1)
decrBy in interface StringCommandskey - the key to decrementdecrement - the value to decrement bypublic long incr(byte[] key)
incr in interface StringBinaryCommandspublic long incrBy(byte[] key,
long increment)
incrBy in interface StringBinaryCommandspublic double incrByFloat(byte[] key,
double increment)
incrByFloat in interface StringBinaryCommandspublic long decr(byte[] key)
decr in interface StringBinaryCommandspublic long decrBy(byte[] key,
long decrement)
decrBy in interface StringBinaryCommandspublic java.util.List<java.lang.String> mget(java.lang.String... keys)
StringCommandsTime complexity: O(1) for every key
mget in interface StringCommandspublic java.lang.String mset(java.lang.String... keysvalues)
StringCommandsMSETNX will not perform any operation at all even
if just a single key already exists.
Because of this semantic MSETNX can be used in order to set different keys representing different fields of an unique logic object in a way that ensures that either all the fields or none at all are set.
Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B are modified, another connection talking to Redis can either see the changes to both A and B at once, or no modification at all.
mset in interface StringCommandskeysvalues - pairs of keys and their values
e.g mset("foo", "foovalue", "bar", "barvalue")public long msetnx(java.lang.String... keysvalues)
StringCommandsMSET will
replace old values with new values, while MSETNX will not perform any operation at all even if
just a single key already exists.
Because of this semantic MSETNX can be used in order to set different keys representing different fields of an unique logic object in a way that ensures that either all the fields or none at all are set.
Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B are modified, another connection talking to Redis can either see the changes to both A and B at once, or no modification at all.
msetnx in interface StringCommandskeysvalues - pairs of keys and their values
e.g msetnx("foo", "foovalue", "bar", "barvalue")public java.util.List<byte[]> mget(byte[]... keys)
mget in interface StringBinaryCommandspublic java.lang.String mset(byte[]... keysvalues)
mset in interface StringBinaryCommandspublic long msetnx(byte[]... keysvalues)
msetnx in interface StringBinaryCommandspublic long append(java.lang.String key,
java.lang.String value)
StringCommandsTime complexity: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.
append in interface StringCommandskey - the key to append tovalue - the value to appendpublic java.lang.String substr(java.lang.String key,
int start,
int end)
StringCommandsThe function handles out of range requests without raising an error, but just limiting the resulting range to the actual length of the string.
Time complexity: O(start+n) (with start being the start index and n the total length of the requested range). Note that the lookup part of this command is O(1) so for small strings this is actually an O(1) command.
substr in interface StringCommandspublic long strlen(java.lang.String key)
StringCommandsstrlen in interface StringCommandspublic long append(byte[] key,
byte[] value)
append in interface StringBinaryCommandspublic byte[] substr(byte[] key,
int start,
int end)
substr in interface StringBinaryCommandspublic long strlen(byte[] key)
strlen in interface StringBinaryCommandspublic long bitcount(java.lang.String key)
BitCommandsbitcount in interface BitCommandspublic long bitcount(java.lang.String key,
long start,
long end)
BitCommandsLike for the GETRANGE command start and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate, and so forth.
bitcount in interface BitCommandsstart - byte start indexend - byte end indexpublic long bitcount(java.lang.String key,
long start,
long end,
BitCountOption option)
bitcount in interface BitCommandsstart - byte start indexend - byte end indexoption - indicate BYTE or BITBitCommands.bitcount(String, long, long)public long bitpos(java.lang.String key,
boolean value)
BitCommandsbitpos in interface BitCommandsvalue - the bit valuepublic long bitpos(java.lang.String key,
boolean value,
BitPosParams params)
BitCommandsbitpos in interface BitCommandsvalue - the bit valueparams - BitPosParamspublic long bitcount(byte[] key)
bitcount in interface BitBinaryCommandspublic long bitcount(byte[] key,
long start,
long end)
bitcount in interface BitBinaryCommandspublic long bitcount(byte[] key,
long start,
long end,
BitCountOption option)
bitcount in interface BitBinaryCommandspublic long bitpos(byte[] key,
boolean value)
bitpos in interface BitBinaryCommandspublic long bitpos(byte[] key,
boolean value,
BitPosParams params)
bitpos in interface BitBinaryCommandspublic java.util.List<java.lang.Long> bitfield(java.lang.String key,
java.lang.String... arguments)
BitCommandsbitfield in interface BitCommandsarguments - may be used with optional argumentspublic java.util.List<java.lang.Long> bitfieldReadonly(java.lang.String key,
java.lang.String... arguments)
BitCommandsBITFIELDbitfieldReadonly in interface BitCommandspublic java.util.List<java.lang.Long> bitfield(byte[] key,
byte[]... arguments)
bitfield in interface BitBinaryCommandspublic java.util.List<java.lang.Long> bitfieldReadonly(byte[] key,
byte[]... arguments)
bitfieldReadonly in interface BitBinaryCommandspublic long bitop(BitOP op, java.lang.String destKey, java.lang.String... srcKeys)
BitCommandsbitop in interface BitCommandsop - can be AND, OR, XOR, NOT, DIFF, DIFF1, ANDOR and ONEpublic long bitop(BitOP op, byte[] destKey, byte[]... srcKeys)
BitBinaryCommandsbitop in interface BitBinaryCommandsop - can be AND, OR, XOR, NOT, DIFF, DIFF1, ANDOR and ONEpublic LCSMatchResult lcs(java.lang.String keyA, java.lang.String keyB, LCSParams params)
StringCommandslcs in interface StringCommandspublic LCSMatchResult lcs(byte[] keyA, byte[] keyB, LCSParams params)
StringBinaryCommandslcs in interface StringBinaryCommandspublic long rpush(java.lang.String key,
java.lang.String... string)
ListCommandsTime complexity: O(1)
rpush in interface ListCommandsstring - data to pushpublic long lpush(java.lang.String key,
java.lang.String... string)
ListCommandsTime complexity: O(1)
lpush in interface ListCommandsstring - data to pushpublic long llen(java.lang.String key)
ListCommandsTime complexity: O(1)
llen in interface ListCommandspublic java.util.List<java.lang.String> lrange(java.lang.String key,
long start,
long stop)
ListCommandsFor example LRANGE foobar 0 2 will return the first three elements of the list.
start and end can also be negative numbers indicating offsets from the end of the list. For example -1 is the last element of the list, -2 the penultimate element and so on.
Consistency with range functions in various programming languages
Note that if you have a list of numbers from 0 to 100, LRANGE 0 10 will return 11 elements, that is, rightmost item is included. This may or may not be consistent with behavior of range-related functions in your programming language of choice (think Ruby's Range.new, Array#slice or Python's range() function).
LRANGE behavior is consistent with one of Tcl.
Out-of-range indexes
Indexes out of range will not produce an error: if start is over the end of the list, or start > end, an empty list is returned. If end is over the end of the list Redis will threat it just like the last element of the list.
Time complexity: O(start+n) (with n being the length of the range and start being the start offset)
lrange in interface ListCommandspublic java.lang.String ltrim(java.lang.String key,
long start,
long stop)
ListCommandsFor example LTRIM foobar 0 2 will modify the list stored at foobar key so that only the first three elements of the list will remain.
start and end can also be negative numbers indicating offsets from the end of the list. For example -1 is the last element of the list, -2 the penultimate element and so on.
Indexes out of range will not produce an error: if start is over the end of the list, or start > end, an empty list is left as value. If end over the end of the list Redis will threat it just like the last element of the list.
Hint: the obvious use of LTRIM is together with LPUSH/RPUSH. For example:
lpush("mylist", "someelement"); ltrim("mylist", 0, 99); *
The above two commands will push elements in the list taking care that the list will not grow without limits. This is very useful when using Redis to store logs for example. It is important to note that when used in this way LTRIM is an O(1) operation because in the average case just one element is removed from the tail of the list.
Time complexity: O(n) (with n being len of list - len of range)
ltrim in interface ListCommandspublic java.lang.String lindex(java.lang.String key,
long index)
ListCommandsIf the value stored at key is not of list type an error is returned. If the index is out of range a 'nil' reply is returned.
Note that even if the average time complexity is O(n) asking for the first or the last element of the list is O(1).
Time complexity: O(n) (with n being the length of the list)
lindex in interface ListCommandspublic long rpush(byte[] key,
byte[]... args)
rpush in interface ListBinaryCommandspublic long lpush(byte[] key,
byte[]... args)
lpush in interface ListBinaryCommandspublic long llen(byte[] key)
llen in interface ListBinaryCommandspublic java.util.List<byte[]> lrange(byte[] key,
long start,
long stop)
lrange in interface ListBinaryCommandspublic java.lang.String ltrim(byte[] key,
long start,
long stop)
ltrim in interface ListBinaryCommandspublic byte[] lindex(byte[] key,
long index)
lindex in interface ListBinaryCommandspublic java.lang.String lset(java.lang.String key,
long index,
java.lang.String value)
ListCommandsOut of range indexes will generate an error.
Similarly to other list commands accepting indexes, the index can be negative to access elements starting from the end of the list. So -1 is the last element, -2 is the penultimate, and so forth.
Time Complexity O(N) when N being the length of the list. For the first or last elements of the list is O(1)
lset in interface ListCommandspublic long lrem(java.lang.String key,
long count,
java.lang.String value)
ListCommandsTime complexity: O(N) (with N being the length of the list)
lrem in interface ListCommandspublic java.lang.String lpop(java.lang.String key)
ListCommandsIf the key does not exist or the list is already empty the special value 'nil' is returned.
lpop in interface ListCommandspublic java.util.List<java.lang.String> lpop(java.lang.String key,
int count)
ListCommandslpop in interface ListCommandspublic java.lang.String lset(byte[] key,
long index,
byte[] value)
lset in interface ListBinaryCommandspublic long lrem(byte[] key,
long count,
byte[] value)
lrem in interface ListBinaryCommandspublic byte[] lpop(byte[] key)
lpop in interface ListBinaryCommandspublic java.util.List<byte[]> lpop(byte[] key,
int count)
lpop in interface ListBinaryCommandspublic java.lang.Long lpos(java.lang.String key,
java.lang.String element)
ListCommandsTime complexity: O(N) where N is the number of elements in the list
lpos in interface ListCommandspublic java.lang.Long lpos(java.lang.String key,
java.lang.String element,
LPosParams params)
ListCommandsMaxlen option compares the element provided only with a given maximum number of list items. A value of 1000 will make sure that the command performs only 1000 comparisons. The comparison is made for the first part or the last part depending on the fact we use a positive or negative rank. Following is how we could use the Maxlen option lpos("foo", "b", LPosParams.lPosParams().rank(1).maxlen(2)).
lpos in interface ListCommandsparams - LPosParamspublic java.util.List<java.lang.Long> lpos(java.lang.String key,
java.lang.String element,
LPosParams params,
long count)
ListCommandsTime complexity: O(N) where N is the number of elements in the list
lpos in interface ListCommandsparams - LPosParamspublic java.lang.Long lpos(byte[] key,
byte[] element)
lpos in interface ListBinaryCommandspublic java.lang.Long lpos(byte[] key,
byte[] element,
LPosParams params)
lpos in interface ListBinaryCommandspublic java.util.List<java.lang.Long> lpos(byte[] key,
byte[] element,
LPosParams params,
long count)
lpos in interface ListBinaryCommandspublic java.lang.String rpop(java.lang.String key)
ListCommandsrpop in interface ListCommandspublic java.util.List<java.lang.String> rpop(java.lang.String key,
int count)
ListCommandsrpop in interface ListCommandscount - return up to count elementspublic byte[] rpop(byte[] key)
rpop in interface ListBinaryCommandspublic java.util.List<byte[]> rpop(byte[] key,
int count)
rpop in interface ListBinaryCommandspublic long linsert(java.lang.String key,
ListPosition where,
java.lang.String pivot,
java.lang.String value)
ListCommandsWhen key does not exist, it is considered an empty list and no operation is performed.
linsert in interface ListCommandswhere - can be BEFORE or AFTERpivot - reference valuevalue - the valuepublic long lpushx(java.lang.String key,
java.lang.String... strings)
ListCommandsLPUSH, no operation will be performed when key
does not yet exist.lpushx in interface ListCommandsstrings - the strings to pushpublic long rpushx(java.lang.String key,
java.lang.String... strings)
ListCommandsRPUSH, no operation will be performed when key
does not yet exist.rpushx in interface ListCommandsstrings - the strings to pushpublic long linsert(byte[] key,
ListPosition where,
byte[] pivot,
byte[] value)
linsert in interface ListBinaryCommandspublic long lpushx(byte[] key,
byte[]... args)
lpushx in interface ListBinaryCommandspublic long rpushx(byte[] key,
byte[]... args)
rpushx in interface ListBinaryCommandspublic java.util.List<java.lang.String> blpop(int timeout,
java.lang.String key)
blpop in interface ListCommandsListCommands.blpop(int, String...)public KeyValue<java.lang.String,java.lang.String> blpop(double timeout, java.lang.String key)
blpop in interface ListCommandsListCommands.blpop(double, String...)public java.util.List<java.lang.String> brpop(int timeout,
java.lang.String key)
brpop in interface ListCommandsListCommands.brpop(int, String...)public KeyValue<java.lang.String,java.lang.String> brpop(double timeout, java.lang.String key)
brpop in interface ListCommandsListCommands.brpop(double, String...)public java.util.List<java.lang.String> blpop(int timeout,
java.lang.String... keys)
ListCommandsListCommands.lpop(String) LPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. An element is popped from the head of
the first list that is non-empty, with the given keys being checked in the order that they are given.blpop in interface ListCommandstimeout - the timeout argument is interpreted as a double value specifying the maximum number of
seconds to block. A timeout of zero can be used to block indefinitely.public KeyValue<java.lang.String,java.lang.String> blpop(double timeout, java.lang.String... keys)
ListCommandsListCommands.lpop(String) LPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. An element is popped from the head of
the first list that is non-empty, with the given keys being checked in the order that they are given.blpop in interface ListCommandstimeout - the timeout argument is interpreted as a double value specifying the maximum number of
seconds to block. A timeout of zero can be used to block indefinitely.public java.util.List<java.lang.String> brpop(int timeout,
java.lang.String... keys)
ListCommandsListCommands.rpop(String) RPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. An element is popped from the tail of
the first list that is non-empty, with the given keys being checked in the order that they are given.brpop in interface ListCommandstimeout - the timeout argument is interpreted as a double value specifying the maximum number of
seconds to block. A timeout of zero can be used to block indefinitely.public KeyValue<java.lang.String,java.lang.String> brpop(double timeout, java.lang.String... keys)
ListCommandsListCommands.rpop(String) RPOP} because it blocks the connection
when there are no elements to pop from any of the given lists. An element is popped from the tail of
the first list that is non-empty, with the given keys being checked in the order that they are given.brpop in interface ListCommandstimeout - the timeout argument is interpreted as a double value specifying the maximum number of
seconds to block. A timeout of zero can be used to block indefinitely.public java.util.List<byte[]> blpop(int timeout,
byte[]... keys)
blpop in interface ListBinaryCommandspublic KeyValue<byte[],byte[]> blpop(double timeout, byte[]... keys)
blpop in interface ListBinaryCommandspublic java.util.List<byte[]> brpop(int timeout,
byte[]... keys)
brpop in interface ListBinaryCommandspublic KeyValue<byte[],byte[]> brpop(double timeout, byte[]... keys)
brpop in interface ListBinaryCommandspublic java.lang.String rpoplpush(java.lang.String srckey,
java.lang.String dstkey)
ListCommandsIf the key does not exist or the list is already empty the special value 'nil' is returned. If the srckey and dstkey are the same the operation is equivalent to removing the last element from the list and pushing it as first element of the list, so it's a "list rotation" command.
Time complexity: O(1)
rpoplpush in interface ListCommandspublic java.lang.String brpoplpush(java.lang.String source,
java.lang.String destination,
int timeout)
ListCommandsListCommands.rpoplpush(String, String). When source is
empty, Redis will block the connection until another client pushes to it or until timeout is
reached. A timeout of zero can be used to block indefinitely.
Time complexity: O(1)
brpoplpush in interface ListCommandstimeout - the timeout argument is interpreted as a double value specifying the maximum number of
seconds to block. A timeout of zero can be used to block indefinitely.public byte[] rpoplpush(byte[] srckey,
byte[] dstkey)
rpoplpush in interface ListBinaryCommandspublic byte[] brpoplpush(byte[] source,
byte[] destination,
int timeout)
brpoplpush in interface ListBinaryCommandspublic java.lang.String lmove(java.lang.String srcKey,
java.lang.String dstKey,
ListDirection from,
ListDirection to)
ListCommandslmove in interface ListCommandsfrom - can be LEFT or RIGHTto - can be LEFT or RIGHTpublic java.lang.String blmove(java.lang.String srcKey,
java.lang.String dstKey,
ListDirection from,
ListDirection to,
double timeout)
ListCommandsblmove in interface ListCommandsfrom - can be LEFT or RIGHTto - can be LEFT or RIGHTtimeout - the timeout argument is interpreted as a double value specifying the maximum number of
seconds to block. A timeout of zero can be used to block indefinitely.public byte[] lmove(byte[] srcKey,
byte[] dstKey,
ListDirection from,
ListDirection to)
lmove in interface ListBinaryCommandspublic byte[] blmove(byte[] srcKey,
byte[] dstKey,
ListDirection from,
ListDirection to,
double timeout)
blmove in interface ListBinaryCommandspublic KeyValue<java.lang.String,java.util.List<java.lang.String>> lmpop(ListDirection direction, java.lang.String... keys)
lmpop in interface ListCommandspublic KeyValue<java.lang.String,java.util.List<java.lang.String>> lmpop(ListDirection direction, int count, java.lang.String... keys)
lmpop in interface ListCommandspublic KeyValue<java.lang.String,java.util.List<java.lang.String>> blmpop(double timeout, ListDirection direction, java.lang.String... keys)
blmpop in interface ListCommandspublic KeyValue<java.lang.String,java.util.List<java.lang.String>> blmpop(double timeout, ListDirection direction, int count, java.lang.String... keys)
blmpop in interface ListCommandspublic KeyValue<byte[],java.util.List<byte[]>> lmpop(ListDirection direction, byte[]... keys)
lmpop in interface ListBinaryCommandspublic KeyValue<byte[],java.util.List<byte[]>> lmpop(ListDirection direction, int count, byte[]... keys)
lmpop in interface ListBinaryCommandspublic KeyValue<byte[],java.util.List<byte[]>> blmpop(double timeout, ListDirection direction, byte[]... keys)
blmpop in interface ListBinaryCommandspublic KeyValue<byte[],java.util.List<byte[]>> blmpop(double timeout, ListDirection direction, int count, byte[]... keys)
blmpop in interface ListBinaryCommandspublic long hset(java.lang.String key,
java.lang.String field,
java.lang.String value)
hset in interface HashCommandspublic long hset(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> hash)
hset in interface HashCommandspublic long hsetex(java.lang.String key,
HSetExParams params,
java.lang.String field,
java.lang.String value)
HashCommandshsetex in interface HashCommandskey - the key of the hashparams - the parameters for the HSETEX commandfield - the field in the hashvalue - the value to setHSetExParamspublic long hsetex(java.lang.String key,
HSetExParams params,
java.util.Map<java.lang.String,java.lang.String> hash)
HashCommandshsetex in interface HashCommandskey - the key of the hashparams - the parameters for the HSETEX commandhash - the map containing field-value pairs to set in the hashHSetExParamspublic java.lang.String hget(java.lang.String key,
java.lang.String field)
hget in interface HashCommandspublic java.util.List<java.lang.String> hgetex(java.lang.String key,
HGetExParams params,
java.lang.String... fields)
HashCommandshgetex in interface HashCommandskey - the key of the hashparams - additional parameters for the HGETEX commandfields - the fields whose values are to be retrievedHGetExParamspublic java.util.List<java.lang.String> hgetdel(java.lang.String key,
java.lang.String... fields)
HashCommandshgetdel in interface HashCommandskey - the key of the hashfields - the fields whose values are to be retrieved and then deletedpublic long hsetnx(java.lang.String key,
java.lang.String field,
java.lang.String value)
hsetnx in interface HashCommandspublic java.lang.String hmset(java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> hash)
hmset in interface HashCommandspublic java.util.List<java.lang.String> hmget(java.lang.String key,
java.lang.String... fields)
hmget in interface HashCommandspublic long hset(byte[] key,
byte[] field,
byte[] value)
hset in interface HashBinaryCommandspublic long hset(byte[] key,
java.util.Map<byte[],byte[]> hash)
hset in interface HashBinaryCommandspublic long hsetex(byte[] key,
HSetExParams params,
byte[] field,
byte[] value)
HashBinaryCommandshsetex in interface HashBinaryCommandskey - the key of the hashparams - the parameters for the HSETEX commandfield - the field in the hashvalue - the value to setHSetExParamspublic long hsetex(byte[] key,
HSetExParams params,
java.util.Map<byte[],byte[]> hash)
HashBinaryCommandshsetex in interface HashBinaryCommandskey - the key of the hashparams - the parameters for the HSETEX commandhash - the map containing field-value pairs to set in the hashHSetExParamspublic byte[] hget(byte[] key,
byte[] field)
hget in interface HashBinaryCommandspublic java.util.List<byte[]> hgetex(byte[] key,
HGetExParams params,
byte[]... fields)
HashBinaryCommandshgetex in interface HashBinaryCommandskey - the key of the hashparams - additional parameters for the HGETEX commandfields - the fields whose values are to be retrievedHGetExParamspublic java.util.List<byte[]> hgetdel(byte[] key,
byte[]... fields)
HashBinaryCommandshgetdel in interface HashBinaryCommandskey - the key of the hashfields - the fields whose values are to be retrieved and then deletedpublic long hsetnx(byte[] key,
byte[] field,
byte[] value)
hsetnx in interface HashBinaryCommandspublic java.lang.String hmset(byte[] key,
java.util.Map<byte[],byte[]> hash)
hmset in interface HashBinaryCommandspublic java.util.List<byte[]> hmget(byte[] key,
byte[]... fields)
hmget in interface HashBinaryCommandspublic long hincrBy(java.lang.String key,
java.lang.String field,
long value)
hincrBy in interface HashCommandspublic double hincrByFloat(java.lang.String key,
java.lang.String field,
double value)
hincrByFloat in interface HashCommandspublic boolean hexists(java.lang.String key,
java.lang.String field)
hexists in interface HashCommandspublic long hdel(java.lang.String key,
java.lang.String... field)
hdel in interface HashCommandspublic long hlen(java.lang.String key)
hlen in interface HashCommandspublic long hincrBy(byte[] key,
byte[] field,
long value)
hincrBy in interface HashBinaryCommandspublic double hincrByFloat(byte[] key,
byte[] field,
double value)
hincrByFloat in interface HashBinaryCommandspublic boolean hexists(byte[] key,
byte[] field)
hexists in interface HashBinaryCommandspublic long hdel(byte[] key,
byte[]... field)
hdel in interface HashBinaryCommandspublic long hlen(byte[] key)
hlen in interface HashBinaryCommandspublic java.util.Set<java.lang.String> hkeys(java.lang.String key)
hkeys in interface HashCommandspublic java.util.List<java.lang.String> hvals(java.lang.String key)
hvals in interface HashCommandspublic java.util.Map<java.lang.String,java.lang.String> hgetAll(java.lang.String key)
hgetAll in interface HashCommandspublic java.util.Set<byte[]> hkeys(byte[] key)
hkeys in interface HashBinaryCommandspublic java.util.List<byte[]> hvals(byte[] key)
hvals in interface HashBinaryCommandspublic java.util.Map<byte[],byte[]> hgetAll(byte[] key)
hgetAll in interface HashBinaryCommandspublic java.lang.String hrandfield(java.lang.String key)
hrandfield in interface HashCommandspublic java.util.List<java.lang.String> hrandfield(java.lang.String key,
long count)
hrandfield in interface HashCommandspublic java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> hrandfieldWithValues(java.lang.String key,
long count)
hrandfieldWithValues in interface HashCommandspublic ScanResult<java.util.Map.Entry<java.lang.String,java.lang.String>> hscan(java.lang.String key, java.lang.String cursor, ScanParams params)
hscan in interface HashCommandspublic ScanResult<java.lang.String> hscanNoValues(java.lang.String key, java.lang.String cursor, ScanParams params)
hscanNoValues in interface HashCommandspublic long hstrlen(java.lang.String key,
java.lang.String field)
hstrlen in interface HashCommandspublic byte[] hrandfield(byte[] key)
hrandfield in interface HashBinaryCommandspublic java.util.List<byte[]> hrandfield(byte[] key,
long count)
hrandfield in interface HashBinaryCommandspublic java.util.List<java.util.Map.Entry<byte[],byte[]>> hrandfieldWithValues(byte[] key,
long count)
hrandfieldWithValues in interface HashBinaryCommandspublic ScanResult<java.util.Map.Entry<byte[],byte[]>> hscan(byte[] key, byte[] cursor, ScanParams params)
hscan in interface HashBinaryCommandspublic ScanResult<byte[]> hscanNoValues(byte[] key, byte[] cursor, ScanParams params)
hscanNoValues in interface HashBinaryCommandspublic long hstrlen(byte[] key,
byte[] field)
hstrlen in interface HashBinaryCommandspublic java.util.List<java.lang.Long> hexpire(java.lang.String key,
long seconds,
java.lang.String... fields)
HashCommandshexpire in interface HashCommandskey - hashseconds - time to expirepublic java.util.List<java.lang.Long> hexpire(java.lang.String key,
long seconds,
ExpiryOption condition,
java.lang.String... fields)
HashCommandshexpire in interface HashCommandskey - hashseconds - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hpexpire(java.lang.String key,
long milliseconds,
java.lang.String... fields)
HashCommandshpexpire in interface HashCommandskey - hashmilliseconds - time to expirepublic java.util.List<java.lang.Long> hpexpire(java.lang.String key,
long milliseconds,
ExpiryOption condition,
java.lang.String... fields)
HashCommandshpexpire in interface HashCommandskey - hashmilliseconds - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hexpireAt(java.lang.String key,
long unixTimeSeconds,
java.lang.String... fields)
HashCommandshexpireAt in interface HashCommandskey - hashunixTimeSeconds - time to expirepublic java.util.List<java.lang.Long> hexpireAt(java.lang.String key,
long unixTimeSeconds,
ExpiryOption condition,
java.lang.String... fields)
HashCommandshexpireAt in interface HashCommandskey - hashunixTimeSeconds - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hpexpireAt(java.lang.String key,
long unixTimeMillis,
java.lang.String... fields)
HashCommandshpexpireAt in interface HashCommandskey - hashunixTimeMillis - time to expirepublic java.util.List<java.lang.Long> hpexpireAt(java.lang.String key,
long unixTimeMillis,
ExpiryOption condition,
java.lang.String... fields)
HashCommandshpexpireAt in interface HashCommandskey - hashunixTimeMillis - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hexpire(byte[] key,
long seconds,
byte[]... fields)
HashBinaryCommandshexpire in interface HashBinaryCommandskey - hashseconds - time to expirepublic java.util.List<java.lang.Long> hexpire(byte[] key,
long seconds,
ExpiryOption condition,
byte[]... fields)
HashBinaryCommandshexpire in interface HashBinaryCommandskey - hashseconds - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hpexpire(byte[] key,
long milliseconds,
byte[]... fields)
HashBinaryCommandshpexpire in interface HashBinaryCommandskey - hashmilliseconds - time to expirepublic java.util.List<java.lang.Long> hpexpire(byte[] key,
long milliseconds,
ExpiryOption condition,
byte[]... fields)
HashBinaryCommandshpexpire in interface HashBinaryCommandskey - hashmilliseconds - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hexpireAt(byte[] key,
long unixTimeSeconds,
byte[]... fields)
HashBinaryCommandshexpireAt in interface HashBinaryCommandskey - hashunixTimeSeconds - time to expirepublic java.util.List<java.lang.Long> hexpireAt(byte[] key,
long unixTimeSeconds,
ExpiryOption condition,
byte[]... fields)
HashBinaryCommandshexpireAt in interface HashBinaryCommandskey - hashunixTimeSeconds - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hpexpireAt(byte[] key,
long unixTimeMillis,
byte[]... fields)
HashBinaryCommandshpexpireAt in interface HashBinaryCommandskey - hashunixTimeMillis - time to expirepublic java.util.List<java.lang.Long> hpexpireAt(byte[] key,
long unixTimeMillis,
ExpiryOption condition,
byte[]... fields)
HashBinaryCommandshpexpireAt in interface HashBinaryCommandskey - hashunixTimeMillis - time to expirecondition - can be NX, XX, GT or LTpublic java.util.List<java.lang.Long> hexpireTime(java.lang.String key,
java.lang.String... fields)
HashCommandshexpireTime in interface HashCommandskey - hashpublic java.util.List<java.lang.Long> hpexpireTime(java.lang.String key,
java.lang.String... fields)
HashCommandshpexpireTime in interface HashCommandskey - hashpublic java.util.List<java.lang.Long> httl(java.lang.String key,
java.lang.String... fields)
HashCommandshttl in interface HashCommandskey - hashpublic java.util.List<java.lang.Long> hpttl(java.lang.String key,
java.lang.String... fields)
HashCommandshpttl in interface HashCommandskey - hashpublic java.util.List<java.lang.Long> hexpireTime(byte[] key,
byte[]... fields)
HashBinaryCommandshexpireTime in interface HashBinaryCommandskey - hashpublic java.util.List<java.lang.Long> hpexpireTime(byte[] key,
byte[]... fields)
HashBinaryCommandshpexpireTime in interface HashBinaryCommandskey - hashpublic java.util.List<java.lang.Long> httl(byte[] key,
byte[]... fields)
HashBinaryCommandshttl in interface HashBinaryCommandskey - hashpublic java.util.List<java.lang.Long> hpttl(byte[] key,
byte[]... fields)
HashBinaryCommandshpttl in interface HashBinaryCommandskey - hashpublic java.util.List<java.lang.Long> hpersist(java.lang.String key,
java.lang.String... fields)
HashCommandshpersist in interface HashCommandskey - hashpublic java.util.List<java.lang.Long> hpersist(byte[] key,
byte[]... fields)
HashBinaryCommandshpersist in interface HashBinaryCommandskey - hashpublic long sadd(java.lang.String key,
java.lang.String... members)
SetCommandsTime complexity O(1)
sadd in interface SetCommandspublic java.util.Set<java.lang.String> smembers(java.lang.String key)
SetCommandsSINTER.
Time complexity O(N)
smembers in interface SetCommandspublic long srem(java.lang.String key,
java.lang.String... members)
SetCommandsTime complexity O(1)
srem in interface SetCommandspublic java.lang.String spop(java.lang.String key)
SetCommands
The SetCommands.srandmember(String) command does a similar work but the returned element is
not removed from the Set.
Time complexity O(1)
spop in interface SetCommandspublic java.util.Set<java.lang.String> spop(java.lang.String key,
long count)
SetCommandsSetCommands.spop(String) pops a single member from the set.
In this command, the reply will consist of up to count members, depending on the set's cardinality.
The SetCommands.srandmember(String) command does a similar work but the returned element is
not removed from the Set.
Time complexity O(N), where N is the value of the passed count
spop in interface SetCommandspublic long scard(java.lang.String key)
SetCommandsscard in interface SetCommandspublic boolean sismember(java.lang.String key,
java.lang.String member)
SetCommandsTime complexity O(1)
sismember in interface SetCommandstrue if the element is a member of the set, false otherwisepublic java.util.List<java.lang.Boolean> smismember(java.lang.String key,
java.lang.String... members)
SetCommandsTime complexity O(N) where N is the number of elements being checked for membership
smismember in interface SetCommandspublic long sadd(byte[] key,
byte[]... members)
sadd in interface SetBinaryCommandspublic java.util.Set<byte[]> smembers(byte[] key)
smembers in interface SetBinaryCommandspublic long srem(byte[] key,
byte[]... members)
srem in interface SetBinaryCommandspublic byte[] spop(byte[] key)
spop in interface SetBinaryCommandspublic java.util.Set<byte[]> spop(byte[] key,
long count)
spop in interface SetBinaryCommandspublic long scard(byte[] key)
scard in interface SetBinaryCommandspublic boolean sismember(byte[] key,
byte[] member)
sismember in interface SetBinaryCommandspublic java.util.List<java.lang.Boolean> smismember(byte[] key,
byte[]... members)
smismember in interface SetBinaryCommandspublic java.lang.String srandmember(java.lang.String key)
SetCommands
The SPOP command does a similar work but the returned element
is popped (removed) from the Set.
Time complexity O(1)
srandmember in interface SetCommandspublic java.util.List<java.lang.String> srandmember(java.lang.String key,
int count)
SetCommands
The SPOP command does a similar work but the returned element
is popped (removed) from the Set.
Time complexity O(1)
srandmember in interface SetCommandscount - if positive, return an array of distinct elements.
If negative the behavior changes and the command is allowed to
return the same element multiple timespublic ScanResult<java.lang.String> sscan(java.lang.String key, java.lang.String cursor, ScanParams params)
sscan in interface SetCommandspublic byte[] srandmember(byte[] key)
srandmember in interface SetBinaryCommandspublic java.util.List<byte[]> srandmember(byte[] key,
int count)
srandmember in interface SetBinaryCommandspublic ScanResult<byte[]> sscan(byte[] key, byte[] cursor, ScanParams params)
sscan in interface SetBinaryCommandspublic java.util.Set<java.lang.String> sdiff(java.lang.String... keys)
SetCommandskeys
Example:
key1 = [x, a, b, c] key2 = [c] key3 = [a, d] SDIFF key1,key2,key3 => [x, b]Non existing keys are considered like empty sets.
Time complexity O(N) with N being the total number of elements of all the sets
sdiff in interface SetCommandskeys - group of setspublic long sdiffstore(java.lang.String dstkey,
java.lang.String... keys)
SetCommandsSDIFF but instead of being
returned the resulting set is stored in dstkey.sdiffstore in interface SetCommandskeys - group of setspublic java.util.Set<java.lang.String> sinter(java.lang.String... keys)
SetCommandsLRANGE the result is sent to
the connection as a multi-bulk reply (see the protocol specification for more information). If
just a single key is specified, then this command produces the same result as
SMEMBERS. Actually SMEMBERS is just syntax sugar for SINTER.
Non existing keys are considered like empty sets, so if one of the keys is missing an empty set is returned (since the intersection with an empty set always is an empty set).
Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the number of sets
sinter in interface SetCommandskeys - group of setspublic long sinterstore(java.lang.String dstkey,
java.lang.String... keys)
SetCommandsSINTER but instead of being
returned the resulting set is stored as dstkey.
Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the number of sets
sinterstore in interface SetCommandskeys - group of setspublic long sintercard(java.lang.String... keys)
SetCommandsSINTER but instead of returning
the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimited
Time complexity O(N*M) worst case where N is the cardinality of the smallest
sintercard in interface SetCommandskeys - group of setspublic long sintercard(int limit,
java.lang.String... keys)
SetCommandsSINTER but instead of returning
the result set, it returns just the cardinality of the result.
Time complexity O(N*M) worst case where N is the cardinality of the smallest
sintercard in interface SetCommandslimit - If the intersection cardinality reaches limit partway through the computation,
the algorithm will exit and yield limit as the cardinality.keys - group of setspublic java.util.Set<java.lang.String> sunion(java.lang.String... keys)
SetCommandsLRANGE the result is sent to the
connection as a multi-bulk reply (see the protocol specification for more information). If just
a single key is specified, then this command produces the same result as
SMEMBERS.
Non existing keys are considered like empty sets.
Time complexity O(N) where N is the total number of elements in all the provided sets
sunion in interface SetCommandskeys - group of setspublic long sunionstore(java.lang.String dstkey,
java.lang.String... keys)
SetCommandsSUNION but instead of being
returned the resulting set is stored as dstkey. Any existing value in dstkey will be
over-written.
Time complexity O(N) where N is the total number of elements in all the provided sets
sunionstore in interface SetCommandskeys - group of setspublic long smove(java.lang.String srckey,
java.lang.String dstkey,
java.lang.String member)
SetCommandsIf the source set does not exist or does not contain the specified element no operation is performed and zero is returned, otherwise the element is removed from the source set and added to the destination set. On success one is returned, even if the element was already present in the destination set.
An error is raised if the source or destination keys contain a non Set value.
Time complexity O(1)
smove in interface SetCommandspublic java.util.Set<byte[]> sdiff(byte[]... keys)
sdiff in interface SetBinaryCommandspublic long sdiffstore(byte[] dstkey,
byte[]... keys)
sdiffstore in interface SetBinaryCommandspublic java.util.Set<byte[]> sinter(byte[]... keys)
sinter in interface SetBinaryCommandspublic long sinterstore(byte[] dstkey,
byte[]... keys)
sinterstore in interface SetBinaryCommandspublic long sintercard(byte[]... keys)
SetBinaryCommandsSINTER but instead of returning
the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimited
Time complexity O(N*M) worst case where N is the cardinality of the smallest
sintercard in interface SetBinaryCommandspublic long sintercard(int limit,
byte[]... keys)
SetBinaryCommandsSINTER but instead of returning
the result set, it returns just the cardinality of the result.
Time complexity O(N*M) worst case where N is the cardinality of the smallest
sintercard in interface SetBinaryCommandslimit - If the intersection cardinality reaches limit partway through the computation,
the algorithm will exit and yield limit as the cardinality.public java.util.Set<byte[]> sunion(byte[]... keys)
sunion in interface SetBinaryCommandspublic long sunionstore(byte[] dstkey,
byte[]... keys)
sunionstore in interface SetBinaryCommandspublic long smove(byte[] srckey,
byte[] dstkey,
byte[] member)
smove in interface SetBinaryCommandspublic long zadd(java.lang.String key,
double score,
java.lang.String member)
SortedSetCommandsThe score value can be the string representation of a double precision floating point number.
Time complexity O(log(N)) with N being the number of elements in the sorted set
zadd in interface SortedSetCommandspublic long zadd(java.lang.String key,
double score,
java.lang.String member,
ZAddParams params)
SortedSetCommandsZADD but can be used with optional params.zadd in interface SortedSetCommandsparams - ZAddParamsSortedSetCommands.zadd(String, double, String)public long zadd(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Double> scoreMembers)
SortedSetCommandsZADD but for multiple members.zadd in interface SortedSetCommandsSortedSetCommands.zadd(String, double, String)public long zadd(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Double> scoreMembers,
ZAddParams params)
SortedSetCommandsZADD but can be used with optional params,
and fits for multiple members.zadd in interface SortedSetCommandsparams - ZAddParamsSortedSetCommands.zadd(String, double, String)public java.lang.Double zaddIncr(java.lang.String key,
double score,
java.lang.String member,
ZAddParams params)
SortedSetCommandsThe score value should be the string representation of a numeric value, and accepts double precision floating point numbers. It is possible to provide a negative value to decrement the score.
Time complexity O(log(N)) with N being the number of elements in the sorted set
zaddIncr in interface SortedSetCommandsparams - ZAddParamspublic long zadd(byte[] key,
double score,
byte[] member)
zadd in interface SortedSetBinaryCommandspublic long zadd(byte[] key,
double score,
byte[] member,
ZAddParams params)
zadd in interface SortedSetBinaryCommandspublic long zadd(byte[] key,
java.util.Map<byte[],java.lang.Double> scoreMembers)
zadd in interface SortedSetBinaryCommandspublic long zadd(byte[] key,
java.util.Map<byte[],java.lang.Double> scoreMembers,
ZAddParams params)
zadd in interface SortedSetBinaryCommandspublic java.lang.Double zaddIncr(byte[] key,
double score,
byte[] member,
ZAddParams params)
zaddIncr in interface SortedSetBinaryCommandspublic long zrem(java.lang.String key,
java.lang.String... members)
SortedSetCommandsTime complexity O(log(N)) with N being the number of elements in the sorted set
zrem in interface SortedSetCommandspublic double zincrby(java.lang.String key,
double increment,
java.lang.String member)
SortedSetCommandsThe score value can be the string representation of a double precision floating point number. It's possible to provide a negative value to perform a decrement.
For an introduction to sorted sets check the Introduction to Redis data types page.
Time complexity O(log(N)) with N being the number of elements in the sorted set
zincrby in interface SortedSetCommandspublic java.lang.Double zincrby(java.lang.String key,
double increment,
java.lang.String member,
ZIncrByParams params)
SortedSetCommandsZINCRBY but can be used with optionals params.zincrby in interface SortedSetCommandsparams - ZIncrByParamsSortedSetCommands.zincrby(String, double, String)public java.lang.Long zrank(java.lang.String key,
java.lang.String member)
SortedSetCommandsWhen the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.
Time complexity O(log(N))
zrank in interface SortedSetCommandspublic java.lang.Long zrevrank(java.lang.String key,
java.lang.String member)
SortedSetCommandsWhen the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.
Time complexity O(log(N))
zrevrank in interface SortedSetCommandspublic KeyValue<java.lang.Long,java.lang.Double> zrankWithScore(java.lang.String key, java.lang.String member)
SortedSetCommandszrankWithScore in interface SortedSetCommandskey - the keymember - the memberpublic KeyValue<java.lang.Long,java.lang.Double> zrevrankWithScore(java.lang.String key, java.lang.String member)
SortedSetCommandszrevrankWithScore in interface SortedSetCommandskey - the keymember - the memberpublic long zrem(byte[] key,
byte[]... members)
zrem in interface SortedSetBinaryCommandspublic double zincrby(byte[] key,
double increment,
byte[] member)
zincrby in interface SortedSetBinaryCommandspublic java.lang.Double zincrby(byte[] key,
double increment,
byte[] member,
ZIncrByParams params)
zincrby in interface SortedSetBinaryCommandspublic java.lang.Long zrank(byte[] key,
byte[] member)
zrank in interface SortedSetBinaryCommandspublic java.lang.Long zrevrank(byte[] key,
byte[] member)
zrevrank in interface SortedSetBinaryCommandspublic KeyValue<java.lang.Long,java.lang.Double> zrankWithScore(byte[] key, byte[] member)
zrankWithScore in interface SortedSetBinaryCommandspublic KeyValue<java.lang.Long,java.lang.Double> zrevrankWithScore(byte[] key, byte[] member)
zrevrankWithScore in interface SortedSetBinaryCommandspublic java.lang.String zrandmember(java.lang.String key)
SortedSetCommandsTime complexity O(N) where N is the number of elements returned
zrandmember in interface SortedSetCommandspublic java.util.List<java.lang.String> zrandmember(java.lang.String key,
long count)
SortedSetCommandsZCARD), whichever is lower.
Time complexity O(N) where N is the number of elements returned
zrandmember in interface SortedSetCommandscount - choose up to count elementspublic java.util.List<Tuple> zrandmemberWithScores(java.lang.String key, long count)
SortedSetCommandsZRANDMEMBER but the replay will
include the scores with the result.zrandmemberWithScores in interface SortedSetCommandscount - choose up to count elementsSortedSetCommands.zrandmember(String, long)public long zcard(java.lang.String key)
SortedSetCommandsTime complexity O(1)
zcard in interface SortedSetCommandspublic java.lang.Double zscore(java.lang.String key,
java.lang.String member)
SortedSetCommandsTime complexity O(1)
zscore in interface SortedSetCommandspublic java.util.List<java.lang.Double> zmscore(java.lang.String key,
java.lang.String... members)
SortedSetCommandsTime complexity O(N) where N is the number of members being requested
zmscore in interface SortedSetCommandspublic byte[] zrandmember(byte[] key)
zrandmember in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrandmember(byte[] key,
long count)
zrandmember in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrandmemberWithScores(byte[] key, long count)
zrandmemberWithScores in interface SortedSetBinaryCommandspublic long zcard(byte[] key)
zcard in interface SortedSetBinaryCommandspublic java.lang.Double zscore(byte[] key,
byte[] member)
zscore in interface SortedSetBinaryCommandspublic java.util.List<java.lang.Double> zmscore(byte[] key,
byte[]... members)
zmscore in interface SortedSetBinaryCommandspublic Tuple zpopmax(java.lang.String key)
SortedSetCommandsTime complexity O(log(N)) with N being the number of elements in the sorted set
zpopmax in interface SortedSetCommandspublic java.util.List<Tuple> zpopmax(java.lang.String key, int count)
SortedSetCommandsTime complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
zpopmax in interface SortedSetCommandscount - the number of elements to poppublic Tuple zpopmin(java.lang.String key)
SortedSetCommandsTime complexity O(log(N)) with N being the number of elements in the sorted set
zpopmin in interface SortedSetCommandspublic java.util.List<Tuple> zpopmin(java.lang.String key, int count)
SortedSetCommandsTime complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
zpopmin in interface SortedSetCommandscount - the number of elements to poppublic long zcount(java.lang.String key,
double min,
double max)
SortedSetCommandsTime complexity O(log(N)) with N being the number of elements in the sorted set.
zcount in interface SortedSetCommandskey - the key to querymin - minimum scoremax - maximum scorepublic long zcount(java.lang.String key,
java.lang.String min,
java.lang.String max)
SortedSetCommandsZCOUNT but with exclusive range.zcount in interface SortedSetCommandsSortedSetCommands.zcount(String, double, double)public Tuple zpopmax(byte[] key)
zpopmax in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zpopmax(byte[] key, int count)
zpopmax in interface SortedSetBinaryCommandspublic Tuple zpopmin(byte[] key)
zpopmin in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zpopmin(byte[] key, int count)
zpopmin in interface SortedSetBinaryCommandspublic long zcount(byte[] key,
double min,
double max)
zcount in interface SortedSetBinaryCommandspublic long zcount(byte[] key,
byte[] min,
byte[] max)
zcount in interface SortedSetBinaryCommandspublic java.util.List<java.lang.String> zrange(java.lang.String key,
long start,
long stop)
SortedSetCommandsTime complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
zrange in interface SortedSetCommandskey - the key to querystart - the minimum indexstop - the maximum indexpublic java.util.List<java.lang.String> zrevrange(java.lang.String key,
long start,
long stop)
SortedSetCommandsTime complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
zrevrange in interface SortedSetCommandskey - the key to querystart - the minimum indexstop - the maximum indexpublic java.util.List<Tuple> zrangeWithScores(java.lang.String key, long start, long stop)
SortedSetCommandszrangeWithScores in interface SortedSetCommandskey - the key to querystart - the minimum indexstop - the maximum indexpublic java.util.List<Tuple> zrevrangeWithScores(java.lang.String key, long start, long stop)
SortedSetCommandsZREVRANGE but the reply will
include the scores of the returned elements.zrevrangeWithScores in interface SortedSetCommandskey - the key to querystart - the minimum indexstop - the maximum indexSortedSetCommands.zrevrange(String, long, long)public java.util.List<java.lang.String> zrange(java.lang.String key,
ZRangeParams zRangeParams)
SortedSetCommandsZRANGE but can be used with additional params.zrange in interface SortedSetCommandskey - the key to queryzRangeParams - ZRangeParamsSortedSetCommands.zrange(String, long, long)public java.util.List<Tuple> zrangeWithScores(java.lang.String key, ZRangeParams zRangeParams)
SortedSetCommandsZRANGE but can be used with additional params.zrangeWithScores in interface SortedSetCommandskey - the key to queryzRangeParams - ZRangeParamsSortedSetCommands.zrangeWithScores(String, long, long)public long zrangestore(java.lang.String dest,
java.lang.String src,
ZRangeParams zRangeParams)
SortedSetCommandsZRANGE but stores the result in dest.zrangestore in interface SortedSetCommandsdest - the storing keysrc - the key to queryzRangeParams - ZRangeParamsSortedSetCommands.zrange(String, ZRangeParams)public java.util.List<java.lang.String> zrangeByScore(java.lang.String key,
double min,
double max)
SortedSetCommandsTime complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
zrangeByScore in interface SortedSetCommandskey - the key to querymin - minimum scoremax - maximum scorepublic java.util.List<java.lang.String> zrangeByScore(java.lang.String key,
java.lang.String min,
java.lang.String max)
SortedSetCommandsZRANGE but with exclusive range.zrangeByScore in interface SortedSetCommandsSortedSetCommands.zrangeByScore(String, double, double)public java.util.List<java.lang.String> zrevrangeByScore(java.lang.String key,
double max,
double min)
SortedSetCommandsThe elements having the same score are returned in reverse lexicographical order.
Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
zrevrangeByScore in interface SortedSetCommandskey - the key to querymax - maximum scoremin - minimum scorepublic java.util.List<java.lang.String> zrangeByScore(java.lang.String key,
double min,
double max,
int offset,
int count)
SortedSetCommandsZRANGE but with exclusive range.zrangeByScore in interface SortedSetCommandskey - the key to querymin - minimum scoremax - maximum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrangeByScore(String, double, double)public java.util.List<java.lang.String> zrevrangeByScore(java.lang.String key,
java.lang.String max,
java.lang.String min)
SortedSetCommandsZREVRANGE but with exclusive range.zrevrangeByScore in interface SortedSetCommandsSortedSetCommands.zrevrangeByScore(String, double, double)public java.util.List<java.lang.String> zrangeByScore(java.lang.String key,
java.lang.String min,
java.lang.String max,
int offset,
int count)
SortedSetCommandsZRANGE but with limit option,zrangeByScore in interface SortedSetCommandskey - the key to querymin - minimum scoremax - maximum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetand with exclusive range.public java.util.List<java.lang.String> zrevrangeByScore(java.lang.String key,
double max,
double min,
int offset,
int count)
SortedSetCommandsZRANGE but with limit option,zrevrangeByScore in interface SortedSetCommandskey - the key to querymax - maximum scoremin - minimum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrevrangeByScore(String, double, double)public java.util.List<Tuple> zrangeByScoreWithScores(java.lang.String key, double min, double max)
SortedSetCommandsZRANGE but return with scores.zrangeByScoreWithScores in interface SortedSetCommandskey - the key to querymin - minimum scoremax - maximum scorereturn both the element and its score, instead of the element alone.public java.util.List<Tuple> zrevrangeByScoreWithScores(java.lang.String key, double max, double min)
SortedSetCommandsZREVRANGE but return with scores.zrevrangeByScoreWithScores in interface SortedSetCommandskey - the key to querymax - maximum scoremin - minimum scorereturn both the element and its score, instead of the element alone.public java.util.List<Tuple> zrangeByScoreWithScores(java.lang.String key, double min, double max, int offset, int count)
SortedSetCommandsZRANGE but with limit option,
and return with scores.zrangeByScoreWithScores in interface SortedSetCommandskey - the key to querymin - minimum scoremax - maximum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrangeByScore(String, double, double)public java.util.List<java.lang.String> zrevrangeByScore(java.lang.String key,
java.lang.String max,
java.lang.String min,
int offset,
int count)
SortedSetCommandsZREVRANGE but with limit option,zrevrangeByScore in interface SortedSetCommandskey - the key to querymax - maximum scoremin - minimum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetand with exclusive range.public java.util.List<Tuple> zrangeByScoreWithScores(java.lang.String key, java.lang.String min, java.lang.String max)
SortedSetCommandsZRANGE but with exclusive range,
and return with scores.zrangeByScoreWithScores in interface SortedSetCommandsSortedSetCommands.zrangeByScore(String, double, double)public java.util.List<Tuple> zrevrangeByScoreWithScores(java.lang.String key, java.lang.String max, java.lang.String min)
SortedSetCommandsZREVRANGE but with exclusive range,
and return with scores.zrevrangeByScoreWithScores in interface SortedSetCommandsSortedSetCommands.zrevrangeByScore(String, double, double)public java.util.List<Tuple> zrangeByScoreWithScores(java.lang.String key, java.lang.String min, java.lang.String max, int offset, int count)
SortedSetCommandsZRANGE but with exclusive range,
with limit options and return with scores.zrangeByScoreWithScores in interface SortedSetCommandskey - the key to querymin - minimum scoremax - maximum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrangeByScore(String, String, String)public java.util.List<Tuple> zrevrangeByScoreWithScores(java.lang.String key, double max, double min, int offset, int count)
SortedSetCommandsZREVRANGE but with
limit options and return with scores.zrevrangeByScoreWithScores in interface SortedSetCommandskey - the key to querymax - maximum scoremin - minimum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrevrangeByScore(String, double, double)public java.util.List<Tuple> zrevrangeByScoreWithScores(java.lang.String key, java.lang.String max, java.lang.String min, int offset, int count)
SortedSetCommandsZREVRANGE but with
exclusive range, with limit options and return with scores.zrevrangeByScoreWithScores in interface SortedSetCommandskey - the key to querymax - maximum scoremin - minimum scoreoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrevrangeByScore(String, double, double)public java.util.List<byte[]> zrange(byte[] key,
long start,
long stop)
zrange in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrevrange(byte[] key,
long start,
long stop)
zrevrange in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrangeWithScores(byte[] key, long start, long stop)
zrangeWithScores in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrevrangeWithScores(byte[] key, long start, long stop)
zrevrangeWithScores in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrange(byte[] key,
ZRangeParams zRangeParams)
zrange in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrangeWithScores(byte[] key, ZRangeParams zRangeParams)
zrangeWithScores in interface SortedSetBinaryCommandspublic long zrangestore(byte[] dest,
byte[] src,
ZRangeParams zRangeParams)
zrangestore in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrangeByScore(byte[] key,
double min,
double max)
zrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrangeByScore(byte[] key,
byte[] min,
byte[] max)
zrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrevrangeByScore(byte[] key,
double max,
double min)
zrevrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrangeByScore(byte[] key,
double min,
double max,
int offset,
int count)
zrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrevrangeByScore(byte[] key,
byte[] max,
byte[] min)
zrevrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrangeByScore(byte[] key,
byte[] min,
byte[] max,
int offset,
int count)
zrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrevrangeByScore(byte[] key,
double max,
double min,
int offset,
int count)
zrevrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrangeByScoreWithScores(byte[] key, double min, double max)
zrangeByScoreWithScores in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrevrangeByScoreWithScores(byte[] key, double max, double min)
zrevrangeByScoreWithScores in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrangeByScoreWithScores(byte[] key, double min, double max, int offset, int count)
zrangeByScoreWithScores in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrevrangeByScore(byte[] key,
byte[] max,
byte[] min,
int offset,
int count)
zrevrangeByScore in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max)
zrangeByScoreWithScores in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min)
zrevrangeByScoreWithScores in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max, int offset, int count)
zrangeByScoreWithScores in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrevrangeByScoreWithScores(byte[] key, double max, double min, int offset, int count)
zrevrangeByScoreWithScores in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min, int offset, int count)
zrevrangeByScoreWithScores in interface SortedSetBinaryCommandspublic long zremrangeByRank(java.lang.String key,
long start,
long stop)
SortedSetCommandsTime complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
zremrangeByRank in interface SortedSetCommandspublic long zremrangeByScore(java.lang.String key,
double min,
double max)
SortedSetCommandsTime complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
zremrangeByScore in interface SortedSetCommandsmin - minimum score to removemax - maximum score to removepublic long zremrangeByScore(java.lang.String key,
java.lang.String min,
java.lang.String max)
SortedSetCommandsZREMRANGE but with limit option.zremrangeByScore in interface SortedSetCommandsSortedSetCommands.zremrangeByScore(String, double, double)public long zremrangeByRank(byte[] key,
long start,
long stop)
zremrangeByRank in interface SortedSetBinaryCommandspublic long zremrangeByScore(byte[] key,
double min,
double max)
zremrangeByScore in interface SortedSetBinaryCommandspublic long zremrangeByScore(byte[] key,
byte[] min,
byte[] max)
zremrangeByScore in interface SortedSetBinaryCommandspublic long zlexcount(java.lang.String key,
java.lang.String min,
java.lang.String max)
SortedSetCommandsTime complexity O(log(N)) with N being the number of elements in the sorted set.
zlexcount in interface SortedSetCommandsmin - minimum valuemax - maximum valuepublic java.util.List<java.lang.String> zrangeByLex(java.lang.String key,
java.lang.String min,
java.lang.String max)
SortedSetCommandsTime complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
zrangeByLex in interface SortedSetCommandsmin - minimum valuemax - maximum valuepublic java.util.List<java.lang.String> zrangeByLex(java.lang.String key,
java.lang.String min,
java.lang.String max,
int offset,
int count)
SortedSetCommandsZRANGE but with limit option.zrangeByLex in interface SortedSetCommandsmin - minimum valuemax - maximum valueoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrangeByLex(String, String, String)public java.util.List<java.lang.String> zrevrangeByLex(java.lang.String key,
java.lang.String max,
java.lang.String min)
SortedSetCommandsTime complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
zrevrangeByLex in interface SortedSetCommandsmax - maximum valuemin - minimum valuepublic java.util.List<java.lang.String> zrevrangeByLex(java.lang.String key,
java.lang.String max,
java.lang.String min,
int offset,
int count)
SortedSetCommandsZRANGE but with limit option.zrevrangeByLex in interface SortedSetCommandsmax - maximum valuemin - minimum valueoffset - the first index of the sub-rangecount - count of the sub-range. A negative count returns all elements from the offsetSortedSetCommands.zrevrangeByLex(String, String, String)public long zremrangeByLex(java.lang.String key,
java.lang.String min,
java.lang.String max)
SortedSetCommandsTime complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
zremrangeByLex in interface SortedSetCommandsmin - minimum value to removemax - maximum value to removepublic long zlexcount(byte[] key,
byte[] min,
byte[] max)
zlexcount in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrangeByLex(byte[] key,
byte[] min,
byte[] max)
zrangeByLex in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrangeByLex(byte[] key,
byte[] min,
byte[] max,
int offset,
int count)
zrangeByLex in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrevrangeByLex(byte[] key,
byte[] max,
byte[] min)
zrevrangeByLex in interface SortedSetBinaryCommandspublic java.util.List<byte[]> zrevrangeByLex(byte[] key,
byte[] max,
byte[] min,
int offset,
int count)
zrevrangeByLex in interface SortedSetBinaryCommandspublic long zremrangeByLex(byte[] key,
byte[] min,
byte[] max)
zremrangeByLex in interface SortedSetBinaryCommandspublic ScanResult<Tuple> zscan(java.lang.String key, java.lang.String cursor, ScanParams params)
zscan in interface SortedSetCommandspublic ScanResult<Tuple> zscan(byte[] key, byte[] cursor, ScanParams params)
zscan in interface SortedSetBinaryCommandspublic KeyValue<java.lang.String,Tuple> bzpopmax(double timeout, java.lang.String... keys)
SortedSetCommandsZPOPMAXbzpopmax in interface SortedSetCommandstimeout - specifying the maximum number of seconds to block. A timeout of zero can
be used to block indefinitely.public KeyValue<java.lang.String,Tuple> bzpopmin(double timeout, java.lang.String... keys)
SortedSetCommandsZPOPMINbzpopmin in interface SortedSetCommandstimeout - specifying the maximum number of seconds to block. A timeout of zero can
be used to block indefinitely.public KeyValue<byte[],Tuple> bzpopmax(double timeout, byte[]... keys)
bzpopmax in interface SortedSetBinaryCommandspublic KeyValue<byte[],Tuple> bzpopmin(double timeout, byte[]... keys)
bzpopmin in interface SortedSetBinaryCommandspublic java.util.List<java.lang.String> zdiff(java.lang.String... keys)
SortedSetCommandsTime complexity O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.
zdiff in interface SortedSetCommandskeys - group of setspublic java.util.List<Tuple> zdiffWithScores(java.lang.String... keys)
SortedSetCommandszdiffWithScores in interface SortedSetCommandskeys - group of sets@Deprecated
public long zdiffStore(java.lang.String dstkey,
java.lang.String... keys)
SortedSetCommandszdiffStore in interface SortedSetCommandskeys - group of setspublic long zdiffstore(java.lang.String dstkey,
java.lang.String... keys)
SortedSetCommandszdiffstore in interface SortedSetCommandskeys - group of setspublic java.util.List<byte[]> zdiff(byte[]... keys)
zdiff in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zdiffWithScores(byte[]... keys)
zdiffWithScores in interface SortedSetBinaryCommands@Deprecated
public long zdiffStore(byte[] dstkey,
byte[]... keys)
zdiffStore in interface SortedSetBinaryCommandspublic long zdiffstore(byte[] dstkey,
byte[]... keys)
zdiffstore in interface SortedSetBinaryCommandspublic long zinterstore(java.lang.String dstkey,
java.lang.String... sets)
SortedSetCommandszinterstore in interface SortedSetCommandssets - group of setspublic long zinterstore(java.lang.String dstkey,
ZParams params,
java.lang.String... sets)
SortedSetCommandszinterstore in interface SortedSetCommandsparams - ZParamssets - group of setspublic java.util.List<java.lang.String> zinter(ZParams params, java.lang.String... keys)
SortedSetCommandsTime complexity O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
zinter in interface SortedSetCommandsparams - ZParamskeys - group of setspublic java.util.List<Tuple> zinterWithScores(ZParams params, java.lang.String... keys)
SortedSetCommandszinterWithScores in interface SortedSetCommandsparams - ZParamskeys - group of setspublic long zinterstore(byte[] dstkey,
byte[]... sets)
zinterstore in interface SortedSetBinaryCommandspublic long zinterstore(byte[] dstkey,
ZParams params,
byte[]... sets)
zinterstore in interface SortedSetBinaryCommandspublic long zintercard(byte[]... keys)
SortedSetBinaryCommandsZINTER, but instead of returning the result set,
it returns just the cardinality of the result.
Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
zintercard in interface SortedSetBinaryCommandskeys - group of setsSortedSetBinaryCommands.zinter(ZParams, byte[][])public long zintercard(long limit,
byte[]... keys)
SortedSetBinaryCommandsZINTER, but instead of returning the result set,
it returns just the cardinality of the result.
Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
zintercard in interface SortedSetBinaryCommandslimit - If the intersection cardinality reaches limit partway through the computation,
the algorithm will exit and yield limit as the cardinalitykeys - group of setsSortedSetBinaryCommands.zinter(ZParams, byte[][])public long zintercard(java.lang.String... keys)
SortedSetCommandsZINTER, but
instead of returning the result set, it returns just the cardinality of the result.
Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
zintercard in interface SortedSetCommandskeys - group of setsSortedSetCommands.zinter(ZParams, String...)public long zintercard(long limit,
java.lang.String... keys)
SortedSetCommandsZINTER, but
instead of returning the result set, it returns just the cardinality of the result.
Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
zintercard in interface SortedSetCommandslimit - If the intersection cardinality reaches limit partway through the computation,
the algorithm will exit and yield limit as the cardinalitykeys - group of setsSortedSetCommands.zinter(ZParams, String...)public java.util.List<byte[]> zinter(ZParams params, byte[]... keys)
zinter in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zinterWithScores(ZParams params, byte[]... keys)
zinterWithScores in interface SortedSetBinaryCommandspublic java.util.List<java.lang.String> zunion(ZParams params, java.lang.String... keys)
SortedSetCommandsTime complexity O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
zunion in interface SortedSetCommandsparams - ZParamskeys - group of setspublic java.util.List<Tuple> zunionWithScores(ZParams params, java.lang.String... keys)
SortedSetCommandszunionWithScores in interface SortedSetCommandsparams - ZParamskeys - group of setspublic long zunionstore(java.lang.String dstkey,
java.lang.String... sets)
SortedSetCommandszunionstore in interface SortedSetCommandssets - group of setspublic long zunionstore(java.lang.String dstkey,
ZParams params,
java.lang.String... sets)
SortedSetCommandszunionstore in interface SortedSetCommandsparams - ZParamssets - group of setspublic java.util.List<byte[]> zunion(ZParams params, byte[]... keys)
zunion in interface SortedSetBinaryCommandspublic java.util.List<Tuple> zunionWithScores(ZParams params, byte[]... keys)
zunionWithScores in interface SortedSetBinaryCommandspublic long zunionstore(byte[] dstkey,
byte[]... sets)
zunionstore in interface SortedSetBinaryCommandspublic long zunionstore(byte[] dstkey,
ZParams params,
byte[]... sets)
zunionstore in interface SortedSetBinaryCommandspublic KeyValue<java.lang.String,java.util.List<Tuple>> zmpop(SortedSetOption option, java.lang.String... keys)
zmpop in interface SortedSetCommandspublic KeyValue<java.lang.String,java.util.List<Tuple>> zmpop(SortedSetOption option, int count, java.lang.String... keys)
zmpop in interface SortedSetCommandspublic KeyValue<java.lang.String,java.util.List<Tuple>> bzmpop(double timeout, SortedSetOption option, java.lang.String... keys)
bzmpop in interface SortedSetCommandspublic KeyValue<java.lang.String,java.util.List<Tuple>> bzmpop(double timeout, SortedSetOption option, int count, java.lang.String... keys)
bzmpop in interface SortedSetCommandspublic KeyValue<byte[],java.util.List<Tuple>> zmpop(SortedSetOption option, byte[]... keys)
zmpop in interface SortedSetBinaryCommandspublic KeyValue<byte[],java.util.List<Tuple>> zmpop(SortedSetOption option, int count, byte[]... keys)
zmpop in interface SortedSetBinaryCommandspublic KeyValue<byte[],java.util.List<Tuple>> bzmpop(double timeout, SortedSetOption option, byte[]... keys)
bzmpop in interface SortedSetBinaryCommandspublic KeyValue<byte[],java.util.List<Tuple>> bzmpop(double timeout, SortedSetOption option, int count, byte[]... keys)
bzmpop in interface SortedSetBinaryCommandspublic long geoadd(java.lang.String key,
double longitude,
double latitude,
java.lang.String member)
GeoCommandsTime complexity: O(log(N)) where N is the number of elements in the sorted set.
geoadd in interface GeoCommandspublic long geoadd(java.lang.String key,
java.util.Map<java.lang.String,GeoCoordinate> memberCoordinateMap)
GeoCommandsTime complexity: O(log(N)) for each item added, where N is the number of elements in the sorted set.
geoadd in interface GeoCommandsmemberCoordinateMap - Members names with their geo coordinatespublic long geoadd(java.lang.String key,
GeoAddParams params,
java.util.Map<java.lang.String,GeoCoordinate> memberCoordinateMap)
GeoCommandsTime complexity: O(log(N)) for each item added
geoadd in interface GeoCommandsparams - Additional optionsmemberCoordinateMap - Members names with their geo coordinatespublic java.lang.Double geodist(java.lang.String key,
java.lang.String member1,
java.lang.String member2)
GeoCommandsTime complexity: O(log(N))
geodist in interface GeoCommandspublic java.lang.Double geodist(java.lang.String key,
java.lang.String member1,
java.lang.String member2,
GeoUnit unit)
GeoCommandsTime complexity: O(log(N))
geodist in interface GeoCommandsunit - can be M, KM, MI or FT can M, KM, MI or FTpublic java.util.List<java.lang.String> geohash(java.lang.String key,
java.lang.String... members)
GeoCommandsTime complexity: O(log(N)) for each member requested
geohash in interface GeoCommandspublic java.util.List<GeoCoordinate> geopos(java.lang.String key, java.lang.String... members)
GeoCommandsTime complexity: O(N) where N is the number of members requested.
geopos in interface GeoCommandspublic long geoadd(byte[] key,
double longitude,
double latitude,
byte[] member)
geoadd in interface GeoBinaryCommandspublic long geoadd(byte[] key,
java.util.Map<byte[],GeoCoordinate> memberCoordinateMap)
geoadd in interface GeoBinaryCommandspublic long geoadd(byte[] key,
GeoAddParams params,
java.util.Map<byte[],GeoCoordinate> memberCoordinateMap)
geoadd in interface GeoBinaryCommandspublic java.lang.Double geodist(byte[] key,
byte[] member1,
byte[] member2)
geodist in interface GeoBinaryCommandspublic java.lang.Double geodist(byte[] key,
byte[] member1,
byte[] member2,
GeoUnit unit)
geodist in interface GeoBinaryCommandspublic java.util.List<byte[]> geohash(byte[] key,
byte[]... members)
geohash in interface GeoBinaryCommandspublic java.util.List<GeoCoordinate> geopos(byte[] key, byte[]... members)
geopos in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadius(java.lang.String key, double longitude, double latitude, double radius, GeoUnit unit)
GeoCommandsTime complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadius in interface GeoCommandslongitude - of the center pointlatitude - of the center pointradius - of the areaunit - can be M, KM, MI or FTpublic java.util.List<GeoRadiusResponse> georadiusReadonly(java.lang.String key, double longitude, double latitude, double radius, GeoUnit unit)
GeoCommandsGEORADIUS,
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusReadonly in interface GeoCommandslongitude - of the center pointlatitude - of the center pointradius - of the areaunit - can be M, KM, MI or FTGeoCommands.georadius(String, double, double, double, GeoUnit)public java.util.List<GeoRadiusResponse> georadius(java.lang.String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
GeoCommandsGeoRadiusParam:
WITHDIST: Also return the distance of the returned items from the specified center.
The distance is returned in the same unit as the unit specified as the radius argument of the command.
WITHCOORD: Also return the longitude,latitude coordinates of the matching items.
WITHHASH: Also return the raw geohash-encoded sorted set score of the item, in the form of a 52
bit unsigned integer. This is only useful for low level hacks or debugging and is otherwise of
little interest for the general user.
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadius in interface GeoCommandslongitude - of the center pointlatitude - of the center pointradius - of the areaunit - can be M, KM, MI or FTparam - GeoRadiusParampublic java.util.List<GeoRadiusResponse> georadiusReadonly(java.lang.String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
GeoCommandsGEORADIUS,
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusReadonly in interface GeoCommandslongitude - of the center pointlatitude - of the center pointradius - of the areaunit - can be M, KM, MI or FTparam - GeoRadiusParamGeoCommands.georadius(String, double, double, double, GeoUnit, GeoRadiusParam)public java.util.List<GeoRadiusResponse> georadiusByMember(java.lang.String key, java.lang.String member, double radius, GeoUnit unit)
GeoCommandsGEORADIUS
with the sole difference that instead of taking, as the center of the area to query, a longitude
and latitude value, it takes the name of a member already existing inside the geospatial index
represented by the sorted set.
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusByMember in interface GeoCommandsmember - represents the center of the arearadius - of the areaunit - can be M, KM, MI or FTpublic java.util.List<GeoRadiusResponse> georadiusByMemberReadonly(java.lang.String key, java.lang.String member, double radius, GeoUnit unit)
GeoCommandsGEORADIUSBYMEMBER
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusByMemberReadonly in interface GeoCommandsmember - represents the center of the arearadius - of the areaunit - can be M, KM, MI or FTpublic java.util.List<GeoRadiusResponse> georadiusByMember(java.lang.String key, java.lang.String member, double radius, GeoUnit unit, GeoRadiusParam param)
GeoCommandsGEORADIUS
with the sole difference that instead of taking, as the center of the area to query, a longitude
and latitude value, it takes the name of a member already existing inside the geospatial index
represented by the sorted set.
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusByMember in interface GeoCommandsmember - represents the center of the arearadius - of the areaunit - can be M, KM, MI or FTparam - GeoRadiusParampublic java.util.List<GeoRadiusResponse> georadiusByMemberReadonly(java.lang.String key, java.lang.String member, double radius, GeoUnit unit, GeoRadiusParam param)
GeoCommandsGEORADIUSBYMEMBER
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusByMemberReadonly in interface GeoCommandsmember - represents the center of the arearadius - of the areaunit - can be M, KM, MI or FTparam - GeoRadiusParampublic long georadiusStore(java.lang.String key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam)
GeoCommandsGEORADIUS
but storing the results at the destination key (provided with storeParam).
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusStore in interface GeoCommandslongitude - of the center pointlatitude - of the center pointradius - of the areaunit - can be M, KM, MI or FTparam - GeoRadiusParamstoreParam - GeoRadiusStoreParampublic long georadiusByMemberStore(java.lang.String key,
java.lang.String member,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam)
GeoCommandsGEORADIUSBYMEMBER
but storing the results at the destination key (provided with storeParam).
Time complexity: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
georadiusByMemberStore in interface GeoCommandsmember - represents the center of the arearadius - of the areaunit - can be M, KM, MI or FTparam - GeoRadiusParamstoreParam - GeoRadiusStoreParampublic java.util.List<GeoRadiusResponse> geosearch(java.lang.String key, java.lang.String member, double radius, GeoUnit unit)
GeoCommands
This command can be used in place of the GEORADIUSBYMEMBER command.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearch in interface GeoCommandsmember - represents the center of the arearadius - of the areaunit - can be M, KM, MI or FTpublic java.util.List<GeoRadiusResponse> geosearch(java.lang.String key, GeoCoordinate coord, double radius, GeoUnit unit)
GeoCommands
This command can be used in place of the GEORADIUS command.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearch in interface GeoCommandscoord - represents the center of the arearadius - of the areaunit - can be M, KM, MI or FTpublic java.util.List<GeoRadiusResponse> geosearch(java.lang.String key, java.lang.String member, double width, double height, GeoUnit unit)
GeoCommandsThe axis-aligned rectangle, determined by height and width, when the center point is determined by the position of the given member.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearch in interface GeoCommandsmember - represents the center of the areawidth - of the rectangular areaheight - of the rectangular areaunit - can be M, KM, MI or FTpublic java.util.List<GeoRadiusResponse> geosearch(java.lang.String key, GeoCoordinate coord, double width, double height, GeoUnit unit)
GeoCommandsThe axis-aligned rectangle, determined by height and width, when the center point is determined by the given coordinate.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearch in interface GeoCommandscoord - represents the center pointwidth - of the rectangular areaheight - of the rectangular areaunit - can be M, KM, MI or FTpublic java.util.List<GeoRadiusResponse> geosearch(java.lang.String key, GeoSearchParam params)
GeoCommandsTime complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearch in interface GeoCommandsparams - GeoSearchParampublic long geosearchStore(java.lang.String dest,
java.lang.String src,
java.lang.String member,
double radius,
GeoUnit unit)
GeoCommandsGEOSEARCH
but storing the results at dest.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearchStore in interface GeoCommandssrc - the sorted set (key)member - represents the center of the arearadius - of the circular areaunit - can be M, KM, MI or FTpublic long geosearchStore(java.lang.String dest,
java.lang.String src,
GeoCoordinate coord,
double radius,
GeoUnit unit)
GeoCommandsGEOSEARCH
but storing the results at dest.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearchStore in interface GeoCommandscoord - represents the center pointradius - of the circular areaunit - can be M, KM, MI or FTpublic long geosearchStore(java.lang.String dest,
java.lang.String src,
java.lang.String member,
double width,
double height,
GeoUnit unit)
GeoCommandsGEOSEARCH
but storing the results at dest.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearchStore in interface GeoCommandsmember - represents the center of the areawidth - of the rectangular areaheight - of the rectangular areaunit - can be M, KM, MI or FTpublic long geosearchStore(java.lang.String dest,
java.lang.String src,
GeoCoordinate coord,
double width,
double height,
GeoUnit unit)
GeoCommandsGEOSEARCH
but storing the results at dest.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearchStore in interface GeoCommandscoord - represents the center pointwidth - of the rectangular areaheight - of the rectangular areaunit - can be M, KM, MI or FTpublic long geosearchStore(java.lang.String dest,
java.lang.String src,
GeoSearchParam params)
GeoCommandsGEOSEARCH
but storing the results at dest.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearchStore in interface GeoCommandsparams - GeoSearchParampublic long geosearchStoreStoreDist(java.lang.String dest,
java.lang.String src,
GeoSearchParam params)
GeoCommandsGEOSEARCHSTORE
but storing the results with their destinations from the center point.
Time complexity: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape
geosearchStoreStoreDist in interface GeoCommandsparams - GeoSearchParampublic java.util.List<GeoRadiusResponse> georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit)
georadius in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit)
georadiusReadonly in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadius(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
georadius in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadiusReadonly(byte[] key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
georadiusReadonly in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit)
georadiusByMember in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit)
georadiusByMemberReadonly in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadiusByMember(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param)
georadiusByMember in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> georadiusByMemberReadonly(byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param)
georadiusByMemberReadonly in interface GeoBinaryCommandspublic long georadiusStore(byte[] key,
double longitude,
double latitude,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam)
georadiusStore in interface GeoBinaryCommandspublic long georadiusByMemberStore(byte[] key,
byte[] member,
double radius,
GeoUnit unit,
GeoRadiusParam param,
GeoRadiusStoreParam storeParam)
georadiusByMemberStore in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> geosearch(byte[] key, byte[] member, double radius, GeoUnit unit)
geosearch in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> geosearch(byte[] key, GeoCoordinate coord, double radius, GeoUnit unit)
geosearch in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> geosearch(byte[] key, byte[] member, double width, double height, GeoUnit unit)
geosearch in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> geosearch(byte[] key, GeoCoordinate coord, double width, double height, GeoUnit unit)
geosearch in interface GeoBinaryCommandspublic java.util.List<GeoRadiusResponse> geosearch(byte[] key, GeoSearchParam params)
geosearch in interface GeoBinaryCommandspublic long geosearchStore(byte[] dest,
byte[] src,
byte[] member,
double radius,
GeoUnit unit)
geosearchStore in interface GeoBinaryCommandspublic long geosearchStore(byte[] dest,
byte[] src,
GeoCoordinate coord,
double radius,
GeoUnit unit)
geosearchStore in interface GeoBinaryCommandspublic long geosearchStore(byte[] dest,
byte[] src,
byte[] member,
double width,
double height,
GeoUnit unit)
geosearchStore in interface GeoBinaryCommandspublic long geosearchStore(byte[] dest,
byte[] src,
GeoCoordinate coord,
double width,
double height,
GeoUnit unit)
geosearchStore in interface GeoBinaryCommandspublic long geosearchStore(byte[] dest,
byte[] src,
GeoSearchParam params)
geosearchStore in interface GeoBinaryCommandspublic long geosearchStoreStoreDist(byte[] dest,
byte[] src,
GeoSearchParam params)
geosearchStoreStoreDist in interface GeoBinaryCommandspublic long pfadd(java.lang.String key,
java.lang.String... elements)
pfadd in interface HyperLogLogCommandspublic java.lang.String pfmerge(java.lang.String destkey,
java.lang.String... sourcekeys)
pfmerge in interface HyperLogLogCommandspublic long pfcount(java.lang.String key)
pfcount in interface HyperLogLogCommandspublic long pfcount(java.lang.String... keys)
pfcount in interface HyperLogLogCommandspublic long pfadd(byte[] key,
byte[]... elements)
pfadd in interface HyperLogLogBinaryCommandspublic java.lang.String pfmerge(byte[] destkey,
byte[]... sourcekeys)
pfmerge in interface HyperLogLogBinaryCommandspublic long pfcount(byte[] key)
pfcount in interface HyperLogLogBinaryCommandspublic long pfcount(byte[]... keys)
pfcount in interface HyperLogLogBinaryCommandspublic StreamEntryID xadd(java.lang.String key, StreamEntryID id, java.util.Map<java.lang.String,java.lang.String> hash)
StreamCommandsxadd in interface StreamCommandspublic StreamEntryID xadd(java.lang.String key, XAddParams params, java.util.Map<java.lang.String,java.lang.String> hash)
xadd in interface StreamCommandspublic long xlen(java.lang.String key)
StreamCommandsxlen in interface StreamCommandspublic java.util.List<StreamEntry> xrange(java.lang.String key, StreamEntryID start, StreamEntryID end)
StreamCommandsxrange in interface StreamCommandsstart - minimum StreamEntryID for the retrieved range, passing null will
indicate minimum ID possible in the streamend - maximum StreamEntryID for the retrieved range, passing null will
indicate maximum ID possible in the streampublic java.util.List<StreamEntry> xrange(java.lang.String key, StreamEntryID start, StreamEntryID end, int count)
StreamCommandsxrange in interface StreamCommandsstart - minimum StreamEntryID for the retrieved range, passing null will
indicate minimum ID possible in the streamend - maximum StreamEntryID for the retrieved range, passing null will
indicate maximum ID possible in the streamcount - maximum number of entries returnedpublic java.util.List<StreamEntry> xrevrange(java.lang.String key, StreamEntryID end, StreamEntryID start)
StreamCommandsxrevrange in interface StreamCommandsend - maximum StreamEntryID for the retrieved range, passing null will
indicate maximum ID possible in the streamstart - minimum StreamEntryID for the retrieved range, passing null will
indicate minimum ID possible in the streampublic java.util.List<StreamEntry> xrevrange(java.lang.String key, StreamEntryID end, StreamEntryID start, int count)
StreamCommandsxrevrange in interface StreamCommandsend - maximum StreamEntryID for the retrieved range, passing null will
indicate maximum ID possible in the streamstart - minimum StreamEntryID for the retrieved range, passing null will
indicate minimum ID possible in the streamcount - The entries with IDs matching the specified range.public java.util.List<StreamEntry> xrange(java.lang.String key, java.lang.String start, java.lang.String end)
xrange in interface StreamCommandspublic java.util.List<StreamEntry> xrange(java.lang.String key, java.lang.String start, java.lang.String end, int count)
xrange in interface StreamCommandspublic java.util.List<StreamEntry> xrevrange(java.lang.String key, java.lang.String end, java.lang.String start)
xrevrange in interface StreamCommandspublic java.util.List<StreamEntry> xrevrange(java.lang.String key, java.lang.String end, java.lang.String start, int count)
xrevrange in interface StreamCommandspublic long xack(java.lang.String key,
java.lang.String group,
StreamEntryID... ids)
StreamCommandsxack in interface StreamCommandspublic java.util.List<StreamEntryDeletionResult> xackdel(java.lang.String key, java.lang.String group, StreamEntryID... ids)
StreamCommandsxackdel in interface StreamCommandspublic java.util.List<StreamEntryDeletionResult> xackdel(java.lang.String key, java.lang.String group, StreamDeletionPolicy trimMode, StreamEntryID... ids)
StreamCommandsxackdel in interface StreamCommandspublic java.lang.String xgroupCreate(java.lang.String key,
java.lang.String groupName,
StreamEntryID id,
boolean makeStream)
StreamCommandsXGROUP CREATE key groupName <id or $>xgroupCreate in interface StreamCommandspublic java.lang.String xgroupSetID(java.lang.String key,
java.lang.String groupName,
StreamEntryID id)
StreamCommandsXGROUP SETID key groupName <id or $>xgroupSetID in interface StreamCommandspublic long xgroupDestroy(java.lang.String key,
java.lang.String groupName)
StreamCommandsxgroupDestroy in interface StreamCommandspublic boolean xgroupCreateConsumer(java.lang.String key,
java.lang.String groupName,
java.lang.String consumerName)
StreamCommandsxgroupCreateConsumer in interface StreamCommandspublic long xgroupDelConsumer(java.lang.String key,
java.lang.String groupName,
java.lang.String consumerName)
StreamCommandsxgroupDelConsumer in interface StreamCommandspublic StreamPendingSummary xpending(java.lang.String key, java.lang.String groupName)
StreamCommandsxpending in interface StreamCommandspublic java.util.List<StreamPendingEntry> xpending(java.lang.String key, java.lang.String groupName, XPendingParams params)
StreamCommandsxpending in interface StreamCommandspublic long xdel(java.lang.String key,
StreamEntryID... ids)
StreamCommandsxdel in interface StreamCommandspublic java.util.List<StreamEntryDeletionResult> xdelex(java.lang.String key, StreamEntryID... ids)
StreamCommandsxdelex in interface StreamCommandspublic java.util.List<StreamEntryDeletionResult> xdelex(java.lang.String key, StreamDeletionPolicy trimMode, StreamEntryID... ids)
StreamCommandsxdelex in interface StreamCommandspublic long xtrim(java.lang.String key,
long maxLen,
boolean approximate)
StreamCommandsxtrim in interface StreamCommandspublic long xtrim(java.lang.String key,
XTrimParams params)
StreamCommandsxtrim in interface StreamCommandspublic java.util.List<StreamEntry> xclaim(java.lang.String key, java.lang.String group, java.lang.String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids)
StreamCommandsXCLAIM key group consumer min-idle-time <ID-1> ... <ID-N>
[IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>]
[FORCE]xclaim in interface StreamCommandspublic java.util.List<StreamEntryID> xclaimJustId(java.lang.String key, java.lang.String group, java.lang.String consumerName, long minIdleTime, XClaimParams params, StreamEntryID... ids)
StreamCommandsXCLAIM key group consumer min-idle-time <ID-1> ... <ID-N>
[IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>]
[FORCE] JUSTIDxclaimJustId in interface StreamCommandspublic java.util.Map.Entry<StreamEntryID,java.util.List<StreamEntry>> xautoclaim(java.lang.String key, java.lang.String group, java.lang.String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params)
StreamCommandsxautoclaim in interface StreamCommandskey - Stream Keygroup - Consumer GroupconsumerName - Consumer name to transfer the auto claimed entriesminIdleTime - Entries pending more than minIdleTime will be transferred ownershipstart - StreamEntryID - Entries ≥ start will be transferred ownership, passing
null will indicate '-'params - XAutoClaimParamspublic java.util.Map.Entry<StreamEntryID,java.util.List<StreamEntryID>> xautoclaimJustId(java.lang.String key, java.lang.String group, java.lang.String consumerName, long minIdleTime, StreamEntryID start, XAutoClaimParams params)
StreamCommandsxautoclaimJustId in interface StreamCommandskey - Stream Keygroup - Consumer GroupconsumerName - Consumer name to transfer the auto claimed entriesminIdleTime - Entries pending more than minIdleTime will be transferred ownershipstart - StreamEntryID - Entries ≥ start will be transferred ownership, passing
null will indicate '-'params - XAutoClaimParamspublic StreamInfo xinfoStream(java.lang.String key)
StreamCommandsxinfoStream in interface StreamCommandskey - Stream nameStreamInfo that contains information about the streampublic StreamFullInfo xinfoStreamFull(java.lang.String key)
StreamCommandsxinfoStreamFull in interface StreamCommandskey - Stream nameStreamFullInfo that contains information about the streampublic StreamFullInfo xinfoStreamFull(java.lang.String key, int count)
StreamCommandsxinfoStreamFull in interface StreamCommandskey - Stream namecount - stream info countStreamFullInfo that contains information about the streampublic java.util.List<StreamGroupInfo> xinfoGroups(java.lang.String key)
StreamCommandsxinfoGroups in interface StreamCommandskey - Stream nameStreamGroupInfo containing information about groupspublic java.util.List<StreamConsumersInfo> xinfoConsumers(java.lang.String key, java.lang.String group)
StreamCommandsxinfoConsumers in interface StreamCommandskey - Stream namegroup - Group nameStreamConsumersInfo containing information about consumers that belong
to the grouppublic java.util.List<StreamConsumerInfo> xinfoConsumers2(java.lang.String key, java.lang.String group)
StreamCommandsxinfoConsumers2 in interface StreamCommandskey - Stream namegroup - Group nameStreamConsumerInfo containing information about consumers that belong
to the grouppublic java.util.List<java.util.Map.Entry<java.lang.String,java.util.List<StreamEntry>>> xread(XReadParams xReadParams, java.util.Map<java.lang.String,StreamEntryID> streams)
StreamCommandsxread in interface StreamCommandspublic java.util.Map<java.lang.String,java.util.List<StreamEntry>> xreadAsMap(XReadParams xReadParams, java.util.Map<java.lang.String,StreamEntryID> streams)
StreamCommandsxreadAsMap in interface StreamCommandspublic java.util.List<java.util.Map.Entry<java.lang.String,java.util.List<StreamEntry>>> xreadGroup(java.lang.String groupName, java.lang.String consumer, XReadGroupParams xReadGroupParams, java.util.Map<java.lang.String,StreamEntryID> streams)
StreamCommandsxreadGroup in interface StreamCommandspublic java.util.Map<java.lang.String,java.util.List<StreamEntry>> xreadGroupAsMap(java.lang.String groupName, java.lang.String consumer, XReadGroupParams xReadGroupParams, java.util.Map<java.lang.String,StreamEntryID> streams)
StreamCommandsxreadGroupAsMap in interface StreamCommandspublic byte[] xadd(byte[] key,
XAddParams params,
java.util.Map<byte[],byte[]> hash)
xadd in interface StreamBinaryCommandspublic long xlen(byte[] key)
xlen in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xrange(byte[] key,
byte[] start,
byte[] end)
xrange in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xrange(byte[] key,
byte[] start,
byte[] end,
int count)
xrange in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xrevrange(byte[] key,
byte[] end,
byte[] start)
xrevrange in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xrevrange(byte[] key,
byte[] end,
byte[] start,
int count)
xrevrange in interface StreamBinaryCommandspublic long xack(byte[] key,
byte[] group,
byte[]... ids)
xack in interface StreamBinaryCommandspublic java.util.List<StreamEntryDeletionResult> xackdel(byte[] key, byte[] group, byte[]... ids)
StreamBinaryCommandsxackdel in interface StreamBinaryCommandspublic java.util.List<StreamEntryDeletionResult> xackdel(byte[] key, byte[] group, StreamDeletionPolicy trimMode, byte[]... ids)
StreamBinaryCommandsxackdel in interface StreamBinaryCommandspublic java.lang.String xgroupCreate(byte[] key,
byte[] groupName,
byte[] id,
boolean makeStream)
xgroupCreate in interface StreamBinaryCommandspublic java.lang.String xgroupSetID(byte[] key,
byte[] groupName,
byte[] id)
xgroupSetID in interface StreamBinaryCommandspublic long xgroupDestroy(byte[] key,
byte[] groupName)
xgroupDestroy in interface StreamBinaryCommandspublic boolean xgroupCreateConsumer(byte[] key,
byte[] groupName,
byte[] consumerName)
xgroupCreateConsumer in interface StreamBinaryCommandspublic long xgroupDelConsumer(byte[] key,
byte[] groupName,
byte[] consumerName)
xgroupDelConsumer in interface StreamBinaryCommandspublic long xdel(byte[] key,
byte[]... ids)
xdel in interface StreamBinaryCommandspublic java.util.List<StreamEntryDeletionResult> xdelex(byte[] key, byte[]... ids)
StreamBinaryCommandsxdelex in interface StreamBinaryCommandspublic java.util.List<StreamEntryDeletionResult> xdelex(byte[] key, StreamDeletionPolicy trimMode, byte[]... ids)
StreamBinaryCommandsxdelex in interface StreamBinaryCommandspublic long xtrim(byte[] key,
long maxLen,
boolean approximateLength)
xtrim in interface StreamBinaryCommandspublic long xtrim(byte[] key,
XTrimParams params)
xtrim in interface StreamBinaryCommandspublic java.lang.Object xpending(byte[] key,
byte[] groupName)
xpending in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xpending(byte[] key,
byte[] groupName,
XPendingParams params)
xpending in interface StreamBinaryCommandspublic java.util.List<byte[]> xclaim(byte[] key,
byte[] group,
byte[] consumerName,
long minIdleTime,
XClaimParams params,
byte[]... ids)
xclaim in interface StreamBinaryCommandspublic java.util.List<byte[]> xclaimJustId(byte[] key,
byte[] group,
byte[] consumerName,
long minIdleTime,
XClaimParams params,
byte[]... ids)
xclaimJustId in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xautoclaim(byte[] key,
byte[] groupName,
byte[] consumerName,
long minIdleTime,
byte[] start,
XAutoClaimParams params)
xautoclaim in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xautoclaimJustId(byte[] key,
byte[] groupName,
byte[] consumerName,
long minIdleTime,
byte[] start,
XAutoClaimParams params)
xautoclaimJustId in interface StreamBinaryCommandspublic java.lang.Object xinfoStream(byte[] key)
xinfoStream in interface StreamBinaryCommandspublic java.lang.Object xinfoStreamFull(byte[] key)
StreamBinaryCommandsxinfoStreamFull in interface StreamBinaryCommandskey - Stream namepublic java.lang.Object xinfoStreamFull(byte[] key,
int count)
StreamBinaryCommandsxinfoStreamFull in interface StreamBinaryCommandskey - Stream namecount - stream info countpublic java.util.List<java.lang.Object> xinfoGroups(byte[] key)
xinfoGroups in interface StreamBinaryCommandspublic java.util.List<java.lang.Object> xinfoConsumers(byte[] key,
byte[] group)
xinfoConsumers in interface StreamBinaryCommands@Deprecated public java.util.List<java.lang.Object> xread(XReadParams xReadParams, java.util.Map.Entry<byte[],byte[]>... streams)
xreadBinary(XReadParams, Map) or
xreadBinaryAsMap(XReadParams, Map) for type safety and better stream entry
parsing.xread in interface StreamBinaryCommands@Deprecated
public java.util.List<java.lang.Object> xreadGroup(byte[] groupName,
byte[] consumer,
XReadGroupParams xReadGroupParams,
java.util.Map.Entry<byte[],byte[]>... streams)
xreadGroupBinary(byte[], byte[], XReadGroupParams, Map) or
xreadGroupBinaryAsMap(byte[], byte[], XReadGroupParams, Map) instead.xreadGroup in interface StreamBinaryCommandspublic java.util.List<java.util.Map.Entry<byte[],java.util.List<StreamEntryBinary>>> xreadBinary(XReadParams xReadParams, java.util.Map<byte[],StreamEntryID> streams)
StreamBinaryCommandsxreadBinary in interface StreamBinaryCommandsxReadParams - XReadParamsstreams - Map of stream name and ID to read from.public java.util.Map<byte[],java.util.List<StreamEntryBinary>> xreadBinaryAsMap(XReadParams xReadParams, java.util.Map<byte[],StreamEntryID> streams)
StreamBinaryCommandsxreadBinaryAsMap in interface StreamBinaryCommandsxReadParams - XReadParamsstreams - Map of stream name and ID to read from.public java.util.List<java.util.Map.Entry<byte[],java.util.List<StreamEntryBinary>>> xreadGroupBinary(byte[] groupName, byte[] consumer, XReadGroupParams xReadGroupParams, java.util.Map<byte[],StreamEntryID> streams)
StreamBinaryCommandsxreadGroupBinary in interface StreamBinaryCommandsgroupName - Consumer group name.consumer - Consumer name.xReadGroupParams - XReadGroupParamsstreams - Map of stream name and ID to read from.public java.util.Map<byte[],java.util.List<StreamEntryBinary>> xreadGroupBinaryAsMap(byte[] groupName, byte[] consumer, XReadGroupParams xReadGroupParams, java.util.Map<byte[],StreamEntryID> streams)
StreamBinaryCommandsxreadGroupBinaryAsMap in interface StreamBinaryCommandsgroupName - Consumer group name.consumer - Consumer name.xReadGroupParams - XReadGroupParamsstreams - Map of stream name and ID to read from.public java.lang.Object eval(java.lang.String script)
ScriptingKeyCommandseval in interface ScriptingKeyCommandsscript - Lua 5.1 script. The script does not need to define a Lua function (and should not).
It is just a Lua program that will run in the context of the Redis server.public java.lang.Object eval(java.lang.String script,
int keyCount,
java.lang.String... params)
ScriptingKeyCommandseval in interface ScriptingKeyCommandsscript - Lua 5.1 script. The script does not need to define a Lua function (and should not).
It is just a Lua program that will run in the context of the Redis server.keyCount - the count of the provided keysparams - arguments that can be accessed from the scriptpublic java.lang.Object eval(java.lang.String script,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
ScriptingKeyCommandseval in interface ScriptingKeyCommandsscript - Lua 5.1 script. The script does not need to define a Lua function (and should not).
It is just a Lua program that will run in the context of the Redis server.keys - arguments that can be accessed by the scriptargs - additional arguments should not represent key names and can be accessed by the scriptpublic java.lang.Object evalReadonly(java.lang.String script,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
ScriptingKeyCommandsEVALevalReadonly in interface ScriptingKeyCommandsscript - Lua 5.1 script. The script does not need to define a Lua function (and should not).
It is just a Lua program that will run in the context of the Redis server.keys - arguments that can be accessed by the scriptargs - additional arguments should not represent key names and can be accessed by the scriptScriptingKeyCommands.eval(String, List, List)public java.lang.Object evalsha(java.lang.String sha1)
ScriptingKeyCommandsEVAL, but the script cached on the server
side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.evalsha in interface ScriptingKeyCommandssha1 - the scriptScriptingKeyCommands.eval(String)public java.lang.Object evalsha(java.lang.String sha1,
int keyCount,
java.lang.String... params)
ScriptingKeyCommandsScriptingKeyCommands.eval(String, int, String...) EVAL}, but the script cached on the server
side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.evalsha in interface ScriptingKeyCommandssha1 - the scriptScriptingKeyCommands.eval(String, int, String...)public java.lang.Object evalsha(java.lang.String sha1,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
ScriptingKeyCommandsScriptingKeyCommands.eval(String, List, List) EVAL}, but the script cached on the server
side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.evalsha in interface ScriptingKeyCommandssha1 - the scriptScriptingKeyCommands.eval(String, List, List)public java.lang.Object evalshaReadonly(java.lang.String sha1,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
ScriptingKeyCommandsEVALevalshaReadonly in interface ScriptingKeyCommandssha1 - the scriptScriptingKeyCommands.evalsha(String, List, List)public java.lang.Object eval(byte[] script)
eval in interface ScriptingKeyBinaryCommandspublic java.lang.Object eval(byte[] script,
int keyCount,
byte[]... params)
eval in interface ScriptingKeyBinaryCommandspublic java.lang.Object eval(byte[] script,
java.util.List<byte[]> keys,
java.util.List<byte[]> args)
eval in interface ScriptingKeyBinaryCommandspublic java.lang.Object evalReadonly(byte[] script,
java.util.List<byte[]> keys,
java.util.List<byte[]> args)
evalReadonly in interface ScriptingKeyBinaryCommandspublic java.lang.Object evalsha(byte[] sha1)
evalsha in interface ScriptingKeyBinaryCommandspublic java.lang.Object evalsha(byte[] sha1,
int keyCount,
byte[]... params)
evalsha in interface ScriptingKeyBinaryCommandspublic java.lang.Object evalsha(byte[] sha1,
java.util.List<byte[]> keys,
java.util.List<byte[]> args)
evalsha in interface ScriptingKeyBinaryCommandspublic java.lang.Object evalshaReadonly(byte[] sha1,
java.util.List<byte[]> keys,
java.util.List<byte[]> args)
evalshaReadonly in interface ScriptingKeyBinaryCommandspublic java.lang.Object fcall(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
FunctionCommandsfcall in interface FunctionCommandspublic java.lang.Object fcallReadonly(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
FunctionCommandsFCALL
command that cannot execute commands that modify data.fcallReadonly in interface FunctionCommandspublic java.lang.String functionDelete(java.lang.String libraryName)
FunctionCommandsfunctionDelete in interface FunctionCommandspublic java.lang.String functionFlush()
FunctionCommandsfunctionFlush in interface FunctionBinaryCommandsfunctionFlush in interface FunctionCommandspublic java.lang.String functionFlush(FlushMode mode)
FunctionCommandsfunctionFlush in interface FunctionBinaryCommandsfunctionFlush in interface FunctionCommandsmode - ASYNC: Asynchronously flush the libraries, SYNC: Synchronously flush the libraries.public java.lang.String functionKill()
FunctionCommandsfunctionKill in interface FunctionBinaryCommandsfunctionKill in interface FunctionCommandspublic java.util.List<LibraryInfo> functionList()
FunctionCommandsfunctionList in interface FunctionCommandsLibraryInfopublic java.util.List<LibraryInfo> functionList(java.lang.String libraryNamePattern)
FunctionCommandsfunctionList in interface FunctionCommandslibraryNamePattern - a pattern for matching library namesLibraryInfopublic java.util.List<LibraryInfo> functionListWithCode()
FunctionCommandsFUNCTION LIST but include the
libraries source implementation in the reply.functionListWithCode in interface FunctionCommandsLibraryInfoFunctionCommands.functionList()public java.util.List<LibraryInfo> functionListWithCode(java.lang.String libraryNamePattern)
FunctionCommandsFUNCTION LIST but include the
libraries source implementation in the reply.functionListWithCode in interface FunctionCommandslibraryNamePattern - a pattern for matching library namesLibraryInfoFunctionCommands.functionList(String)public java.lang.String functionLoad(java.lang.String functionCode)
FunctionCommands
The library payload must start with Shebang statement that provides a metadata about the
library (like the engine to use and the library name). Shebang format:
#!<engine name> name=<library name>. Currently engine name must be lua.
functionLoad in interface FunctionCommandsfunctionCode - the source code.public java.lang.String functionLoadReplace(java.lang.String functionCode)
FunctionCommandsfunctionLoadReplace in interface FunctionCommandsfunctionCode - the source codepublic FunctionStats functionStats()
FunctionCommandsfunctionStats in interface FunctionCommandsFunctionStatspublic java.lang.Object fcall(byte[] name,
java.util.List<byte[]> keys,
java.util.List<byte[]> args)
FunctionBinaryCommandsfcall in interface FunctionBinaryCommandspublic java.lang.Object fcallReadonly(byte[] name,
java.util.List<byte[]> keys,
java.util.List<byte[]> args)
fcallReadonly in interface FunctionBinaryCommandspublic java.lang.String functionDelete(byte[] libraryName)
FunctionBinaryCommandsfunctionDelete in interface FunctionBinaryCommandspublic byte[] functionDump()
FunctionCommandsFUNCTION RESTORE command.functionDump in interface FunctionBinaryCommandsfunctionDump in interface FunctionCommandspublic java.util.List<java.lang.Object> functionListBinary()
FunctionBinaryCommandsfunctionListBinary in interface FunctionBinaryCommandsLibraryInfopublic java.util.List<java.lang.Object> functionList(byte[] libraryNamePattern)
FunctionBinaryCommandsfunctionList in interface FunctionBinaryCommandslibraryNamePattern - a pattern for matching library namesLibraryInfopublic java.util.List<java.lang.Object> functionListWithCodeBinary()
FunctionBinaryCommandsFUNCTION LIST but include the
libraries source implementation in the reply.functionListWithCodeBinary in interface FunctionBinaryCommandsLibraryInfoFunctionCommands.functionList()public java.util.List<java.lang.Object> functionListWithCode(byte[] libraryNamePattern)
FunctionBinaryCommandsFUNCTION LIST but include the
libraries source implementation in the reply.functionListWithCode in interface FunctionBinaryCommandslibraryNamePattern - a pattern for matching library namesLibraryInfoFunctionBinaryCommands.functionList(byte[])public java.lang.String functionLoad(byte[] functionCode)
FunctionBinaryCommands
The library payload must start with Shebang statement that provides a metadata about the
library (like the engine to use and the library name). Shebang format:
#!<engine name> name=<library name>. Currently engine name must be lua.
functionLoad in interface FunctionBinaryCommandsfunctionCode - the source code.public java.lang.String functionLoadReplace(byte[] functionCode)
FunctionBinaryCommandsfunctionLoadReplace in interface FunctionBinaryCommandsfunctionCode - the source codepublic java.lang.String functionRestore(byte[] serializedValue)
FunctionCommandsfunctionRestore in interface FunctionBinaryCommandsfunctionRestore in interface FunctionCommandsserializedValue - the serialized payloadpublic java.lang.String functionRestore(byte[] serializedValue,
FunctionRestorePolicy policy)
FunctionCommandsfunctionRestore in interface FunctionBinaryCommandsfunctionRestore in interface FunctionCommandsserializedValue - the serialized payloadpolicy - can be FLUSH, APPEND or REPLACEpublic java.lang.Object functionStatsBinary()
FunctionBinaryCommandsfunctionStatsBinary in interface FunctionBinaryCommandsFunctionStatspublic java.lang.Long objectRefcount(java.lang.String key)
KeyCommandsTime complexity: O(1)
objectRefcount in interface KeyCommandspublic java.lang.String objectEncoding(java.lang.String key)
KeyCommandsTime complexity: O(1)
objectEncoding in interface KeyCommandspublic java.lang.Long objectIdletime(java.lang.String key)
KeyCommandsTime complexity: O(1)
objectIdletime in interface KeyCommandspublic java.lang.Long objectFreq(java.lang.String key)
KeyCommandsTime complexity: O(1)
objectFreq in interface KeyCommandspublic java.lang.Long objectRefcount(byte[] key)
objectRefcount in interface KeyBinaryCommandspublic byte[] objectEncoding(byte[] key)
objectEncoding in interface KeyBinaryCommandspublic java.lang.Long objectIdletime(byte[] key)
objectIdletime in interface KeyBinaryCommandspublic java.lang.Long objectFreq(byte[] key)
objectFreq in interface KeyBinaryCommandspublic java.lang.String migrate(java.lang.String host,
int port,
java.lang.String key,
int timeout)
KeyCommandsmigrate in interface KeyCommandstimeout - the maximum idle time in any moment of the communication with the
destination instance in milliseconds.public java.lang.String migrate(java.lang.String host,
int port,
int timeout,
MigrateParams params,
java.lang.String... keys)
KeyCommandsmigrate in interface KeyCommandstimeout - the maximum idle time in any moment of the communication with the
destination instance in milliseconds.params - MigrateParamspublic java.lang.String migrate(java.lang.String host,
int port,
byte[] key,
int timeout)
migrate in interface KeyBinaryCommandspublic java.lang.String migrate(java.lang.String host,
int port,
int timeout,
MigrateParams params,
byte[]... keys)
migrate in interface KeyBinaryCommandspublic long waitReplicas(java.lang.String sampleKey,
int replicas,
long timeout)
waitReplicas in interface SampleKeyedCommandspublic long waitReplicas(byte[] sampleKey,
int replicas,
long timeout)
waitReplicas in interface SampleBinaryKeyedCommandspublic KeyValue<java.lang.Long,java.lang.Long> waitAOF(java.lang.String sampleKey, long numLocal, long numReplicas, long timeout)
waitAOF in interface SampleKeyedCommandspublic KeyValue<java.lang.Long,java.lang.Long> waitAOF(byte[] sampleKey, long numLocal, long numReplicas, long timeout)
waitAOF in interface SampleBinaryKeyedCommandspublic java.lang.Object eval(java.lang.String script,
java.lang.String sampleKey)
eval in interface SampleKeyedCommandspublic java.lang.Object evalsha(java.lang.String sha1,
java.lang.String sampleKey)
evalsha in interface SampleKeyedCommandspublic java.lang.Object eval(byte[] script,
byte[] sampleKey)
eval in interface SampleBinaryKeyedCommandspublic java.lang.Object evalsha(byte[] sha1,
byte[] sampleKey)
evalsha in interface SampleBinaryKeyedCommandspublic java.util.List<java.lang.Boolean> scriptExists(java.util.List<java.lang.String> sha1s)
public java.lang.Boolean scriptExists(java.lang.String sha1,
java.lang.String sampleKey)
scriptExists in interface SampleKeyedCommandspublic java.util.List<java.lang.Boolean> scriptExists(java.lang.String sampleKey,
java.lang.String... sha1s)
scriptExists in interface SampleKeyedCommandspublic java.lang.Boolean scriptExists(byte[] sha1,
byte[] sampleKey)
scriptExists in interface SampleBinaryKeyedCommandspublic java.util.List<java.lang.Boolean> scriptExists(byte[] sampleKey,
byte[]... sha1s)
scriptExists in interface SampleBinaryKeyedCommandspublic java.lang.String scriptLoad(java.lang.String script)
public java.lang.String scriptLoad(java.lang.String script,
java.lang.String sampleKey)
scriptLoad in interface SampleKeyedCommandspublic java.lang.String scriptFlush()
public java.lang.String scriptFlush(java.lang.String sampleKey)
scriptFlush in interface SampleKeyedCommandspublic java.lang.String scriptFlush(java.lang.String sampleKey,
FlushMode flushMode)
scriptFlush in interface SampleKeyedCommandspublic java.lang.String scriptKill()
public java.lang.String scriptKill(java.lang.String sampleKey)
scriptKill in interface SampleKeyedCommandspublic byte[] scriptLoad(byte[] script,
byte[] sampleKey)
scriptLoad in interface SampleBinaryKeyedCommandspublic java.lang.String scriptFlush(byte[] sampleKey)
scriptFlush in interface SampleBinaryKeyedCommandspublic java.lang.String scriptFlush(byte[] sampleKey,
FlushMode flushMode)
scriptFlush in interface SampleBinaryKeyedCommandspublic java.lang.String scriptKill(byte[] sampleKey)
scriptKill in interface SampleBinaryKeyedCommandspublic java.lang.String slowlogReset()
public long publish(java.lang.String channel,
java.lang.String message)
public long publish(byte[] channel,
byte[] message)
public void subscribe(JedisPubSub jedisPubSub, java.lang.String... channels)
public void psubscribe(JedisPubSub jedisPubSub, java.lang.String... patterns)
public void subscribe(BinaryJedisPubSub jedisPubSub, byte[]... channels)
public void psubscribe(BinaryJedisPubSub jedisPubSub, byte[]... patterns)
public long hsetObject(java.lang.String key,
java.lang.String field,
java.lang.Object value)
public long hsetObject(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Object> hash)
public java.lang.String ftCreate(java.lang.String indexName,
IndexOptions indexOptions,
Schema schema)
ftCreate in interface RediSearchCommandspublic java.lang.String ftCreate(java.lang.String indexName,
FTCreateParams createParams,
java.lang.Iterable<SchemaField> schemaFields)
ftCreate in interface RediSearchCommandspublic java.lang.String ftAlter(java.lang.String indexName,
Schema schema)
ftAlter in interface RediSearchCommandspublic java.lang.String ftAlter(java.lang.String indexName,
java.lang.Iterable<SchemaField> schemaFields)
ftAlter in interface RediSearchCommandspublic java.lang.String ftAliasAdd(java.lang.String aliasName,
java.lang.String indexName)
ftAliasAdd in interface RediSearchCommandspublic java.lang.String ftAliasUpdate(java.lang.String aliasName,
java.lang.String indexName)
ftAliasUpdate in interface RediSearchCommandspublic java.lang.String ftAliasDel(java.lang.String aliasName)
ftAliasDel in interface RediSearchCommandspublic java.lang.String ftDropIndex(java.lang.String indexName)
ftDropIndex in interface RediSearchCommandspublic java.lang.String ftDropIndexDD(java.lang.String indexName)
ftDropIndexDD in interface RediSearchCommandspublic SearchResult ftSearch(java.lang.String indexName, java.lang.String query)
ftSearch in interface RediSearchCommandspublic SearchResult ftSearch(java.lang.String indexName, java.lang.String query, FTSearchParams params)
ftSearch in interface RediSearchCommandspublic FtSearchIteration ftSearchIteration(int batchSize, java.lang.String indexName, java.lang.String query, FTSearchParams params)
FTSearchParams.limit(int, int) will be ignored.batchSize - batch sizeindexName - index namequery - queryparams - limit will be ignoredpublic SearchResult ftSearch(java.lang.String indexName, Query query)
ftSearch in interface RediSearchCommandspublic FtSearchIteration ftSearchIteration(int batchSize, java.lang.String indexName, Query query)
Query.limit(java.lang.Integer, java.lang.Integer) will be ignored.batchSize - batch sizeindexName - index namequery - limit will be ignored@Deprecated public SearchResult ftSearch(byte[] indexName, Query query)
ftSearch in interface RediSearchCommandspublic java.lang.String ftExplain(java.lang.String indexName,
Query query)
ftExplain in interface RediSearchCommandspublic java.util.List<java.lang.String> ftExplainCLI(java.lang.String indexName,
Query query)
ftExplainCLI in interface RediSearchCommandspublic AggregationResult ftAggregate(java.lang.String indexName, AggregationBuilder aggr)
ftAggregate in interface RediSearchCommandspublic AggregationResult ftCursorRead(java.lang.String indexName, long cursorId, int count)
ftCursorRead in interface RediSearchCommandspublic java.lang.String ftCursorDel(java.lang.String indexName,
long cursorId)
ftCursorDel in interface RediSearchCommandspublic FtAggregateIteration ftAggregateIteration(java.lang.String indexName, AggregationBuilder aggr)
CURSOR must be set.indexName - index nameaggr - cursor must be setpublic java.util.Map.Entry<AggregationResult,ProfilingInfo> ftProfileAggregate(java.lang.String indexName, FTProfileParams profileParams, AggregationBuilder aggr)
ftProfileAggregate in interface RediSearchCommandspublic java.util.Map.Entry<SearchResult,ProfilingInfo> ftProfileSearch(java.lang.String indexName, FTProfileParams profileParams, Query query)
ftProfileSearch in interface RediSearchCommandspublic java.util.Map.Entry<SearchResult,ProfilingInfo> ftProfileSearch(java.lang.String indexName, FTProfileParams profileParams, java.lang.String query, FTSearchParams searchParams)
ftProfileSearch in interface RediSearchCommandspublic java.lang.String ftSynUpdate(java.lang.String indexName,
java.lang.String synonymGroupId,
java.lang.String... terms)
ftSynUpdate in interface RediSearchCommandspublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> ftSynDump(java.lang.String indexName)
ftSynDump in interface RediSearchCommandspublic long ftDictAdd(java.lang.String dictionary,
java.lang.String... terms)
ftDictAdd in interface RediSearchCommandspublic long ftDictDel(java.lang.String dictionary,
java.lang.String... terms)
ftDictDel in interface RediSearchCommandspublic java.util.Set<java.lang.String> ftDictDump(java.lang.String dictionary)
ftDictDump in interface RediSearchCommandspublic long ftDictAddBySampleKey(java.lang.String indexName,
java.lang.String dictionary,
java.lang.String... terms)
ftDictAddBySampleKey in interface RediSearchCommandspublic long ftDictDelBySampleKey(java.lang.String indexName,
java.lang.String dictionary,
java.lang.String... terms)
ftDictDelBySampleKey in interface RediSearchCommandspublic java.util.Set<java.lang.String> ftDictDumpBySampleKey(java.lang.String indexName,
java.lang.String dictionary)
ftDictDumpBySampleKey in interface RediSearchCommandspublic java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> ftSpellCheck(java.lang.String index,
java.lang.String query)
ftSpellCheck in interface RediSearchCommandspublic java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Double>> ftSpellCheck(java.lang.String index,
java.lang.String query,
FTSpellCheckParams spellCheckParams)
ftSpellCheck in interface RediSearchCommandspublic java.util.Map<java.lang.String,java.lang.Object> ftInfo(java.lang.String indexName)
ftInfo in interface RediSearchCommandspublic java.util.Set<java.lang.String> ftTagVals(java.lang.String indexName,
java.lang.String fieldName)
ftTagVals in interface RediSearchCommands@Deprecated public java.util.Map<java.lang.String,java.lang.Object> ftConfigGet(java.lang.String option)
ftConfigGet in interface RediSearchCommands@Deprecated
public java.util.Map<java.lang.String,java.lang.Object> ftConfigGet(java.lang.String indexName,
java.lang.String option)
ftConfigGet in interface RediSearchCommands@Deprecated
public java.lang.String ftConfigSet(java.lang.String option,
java.lang.String value)
ftConfigSet in interface RediSearchCommands@Deprecated
public java.lang.String ftConfigSet(java.lang.String indexName,
java.lang.String option,
java.lang.String value)
ftConfigSet in interface RediSearchCommandspublic long ftSugAdd(java.lang.String key,
java.lang.String string,
double score)
ftSugAdd in interface RediSearchCommandspublic long ftSugAddIncr(java.lang.String key,
java.lang.String string,
double score)
ftSugAddIncr in interface RediSearchCommandspublic java.util.List<java.lang.String> ftSugGet(java.lang.String key,
java.lang.String prefix)
ftSugGet in interface RediSearchCommandspublic java.util.List<java.lang.String> ftSugGet(java.lang.String key,
java.lang.String prefix,
boolean fuzzy,
int max)
ftSugGet in interface RediSearchCommandspublic java.util.List<Tuple> ftSugGetWithScores(java.lang.String key, java.lang.String prefix)
ftSugGetWithScores in interface RediSearchCommandspublic java.util.List<Tuple> ftSugGetWithScores(java.lang.String key, java.lang.String prefix, boolean fuzzy, int max)
ftSugGetWithScores in interface RediSearchCommandspublic boolean ftSugDel(java.lang.String key,
java.lang.String string)
ftSugDel in interface RediSearchCommandspublic long ftSugLen(java.lang.String key)
ftSugLen in interface RediSearchCommandspublic java.util.Set<java.lang.String> ftList()
ftList in interface RediSearchCommandspublic java.lang.String jsonSet(java.lang.String key,
Path2 path,
java.lang.Object object)
jsonSet in interface RedisJsonV2Commandspublic java.lang.String jsonSetWithEscape(java.lang.String key,
Path2 path,
java.lang.Object object)
jsonSetWithEscape in interface RedisJsonV2Commands@Deprecated
public java.lang.String jsonSet(java.lang.String key,
Path path,
java.lang.Object pojo)
jsonSet in interface RedisJsonV1Commands@Deprecated
public java.lang.String jsonSetWithPlainString(java.lang.String key,
Path path,
java.lang.String string)
jsonSetWithPlainString in interface RedisJsonV1Commandspublic java.lang.String jsonSet(java.lang.String key,
Path2 path,
java.lang.Object pojo,
JsonSetParams params)
jsonSet in interface RedisJsonV2Commandspublic java.lang.String jsonSetWithEscape(java.lang.String key,
Path2 path,
java.lang.Object pojo,
JsonSetParams params)
jsonSetWithEscape in interface RedisJsonV2Commands@Deprecated
public java.lang.String jsonSet(java.lang.String key,
Path path,
java.lang.Object pojo,
JsonSetParams params)
jsonSet in interface RedisJsonV1Commandspublic java.lang.String jsonMerge(java.lang.String key,
Path2 path,
java.lang.Object object)
jsonMerge in interface RedisJsonV2Commands@Deprecated
public java.lang.String jsonMerge(java.lang.String key,
Path path,
java.lang.Object pojo)
jsonMerge in interface RedisJsonV1Commandspublic java.lang.Object jsonGet(java.lang.String key)
jsonGet in interface RedisJsonV1CommandsjsonGet in interface RedisJsonV2Commands@Deprecated
public <T> T jsonGet(java.lang.String key,
java.lang.Class<T> clazz)
jsonGet in interface RedisJsonV1Commandspublic java.lang.Object jsonGet(java.lang.String key,
Path2... paths)
jsonGet in interface RedisJsonV2Commands@Deprecated
public java.lang.Object jsonGet(java.lang.String key,
Path... paths)
jsonGet in interface RedisJsonV1Commands@Deprecated
public java.lang.String jsonGetAsPlainString(java.lang.String key,
Path path)
jsonGetAsPlainString in interface RedisJsonV1Commands@Deprecated
public <T> T jsonGet(java.lang.String key,
java.lang.Class<T> clazz,
Path... paths)
jsonGet in interface RedisJsonV1Commandspublic java.util.List<org.json.JSONArray> jsonMGet(Path2 path, java.lang.String... keys)
jsonMGet in interface RedisJsonV2Commands@Deprecated public <T> java.util.List<T> jsonMGet(Path path, java.lang.Class<T> clazz, java.lang.String... keys)
jsonMGet in interface RedisJsonV1Commandspublic long jsonDel(java.lang.String key)
jsonDel in interface RedisJsonV1CommandsjsonDel in interface RedisJsonV2Commandspublic long jsonDel(java.lang.String key,
Path2 path)
jsonDel in interface RedisJsonV2Commands@Deprecated
public long jsonDel(java.lang.String key,
Path path)
jsonDel in interface RedisJsonV1Commandspublic long jsonClear(java.lang.String key)
jsonClear in interface RedisJsonV1CommandsjsonClear in interface RedisJsonV2Commandspublic long jsonClear(java.lang.String key,
Path2 path)
jsonClear in interface RedisJsonV2Commands@Deprecated
public long jsonClear(java.lang.String key,
Path path)
jsonClear in interface RedisJsonV1Commandspublic java.util.List<java.lang.Boolean> jsonToggle(java.lang.String key,
Path2 path)
jsonToggle in interface RedisJsonV2Commands@Deprecated
public java.lang.String jsonToggle(java.lang.String key,
Path path)
jsonToggle in interface RedisJsonV1Commands@Deprecated public java.lang.Class<?> jsonType(java.lang.String key)
jsonType in interface RedisJsonV1Commandspublic java.util.List<java.lang.Class<?>> jsonType(java.lang.String key,
Path2 path)
jsonType in interface RedisJsonV2Commands@Deprecated
public java.lang.Class<?> jsonType(java.lang.String key,
Path path)
jsonType in interface RedisJsonV1Commands@Deprecated
public long jsonStrAppend(java.lang.String key,
java.lang.Object string)
jsonStrAppend in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonStrAppend(java.lang.String key,
Path2 path,
java.lang.Object string)
jsonStrAppend in interface RedisJsonV2Commands@Deprecated
public long jsonStrAppend(java.lang.String key,
Path path,
java.lang.Object string)
jsonStrAppend in interface RedisJsonV1Commands@Deprecated public java.lang.Long jsonStrLen(java.lang.String key)
jsonStrLen in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonStrLen(java.lang.String key,
Path2 path)
jsonStrLen in interface RedisJsonV2Commands@Deprecated
public java.lang.Long jsonStrLen(java.lang.String key,
Path path)
jsonStrLen in interface RedisJsonV1Commandspublic java.lang.Object jsonNumIncrBy(java.lang.String key,
Path2 path,
double value)
jsonNumIncrBy in interface RedisJsonV2Commands@Deprecated
public double jsonNumIncrBy(java.lang.String key,
Path path,
double value)
jsonNumIncrBy in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonArrAppend(java.lang.String key,
Path2 path,
java.lang.Object... objects)
jsonArrAppend in interface RedisJsonV2Commandspublic java.util.List<java.lang.Long> jsonArrAppendWithEscape(java.lang.String key,
Path2 path,
java.lang.Object... objects)
jsonArrAppendWithEscape in interface RedisJsonV2Commands@Deprecated
public java.lang.Long jsonArrAppend(java.lang.String key,
Path path,
java.lang.Object... pojos)
jsonArrAppend in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonArrIndex(java.lang.String key,
Path2 path,
java.lang.Object scalar)
jsonArrIndex in interface RedisJsonV2Commandspublic java.util.List<java.lang.Long> jsonArrIndexWithEscape(java.lang.String key,
Path2 path,
java.lang.Object scalar)
jsonArrIndexWithEscape in interface RedisJsonV2Commands@Deprecated
public long jsonArrIndex(java.lang.String key,
Path path,
java.lang.Object scalar)
jsonArrIndex in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonArrInsert(java.lang.String key,
Path2 path,
int index,
java.lang.Object... objects)
jsonArrInsert in interface RedisJsonV2Commandspublic java.util.List<java.lang.Long> jsonArrInsertWithEscape(java.lang.String key,
Path2 path,
int index,
java.lang.Object... objects)
jsonArrInsertWithEscape in interface RedisJsonV2Commands@Deprecated
public long jsonArrInsert(java.lang.String key,
Path path,
int index,
java.lang.Object... pojos)
jsonArrInsert in interface RedisJsonV1Commands@Deprecated public java.lang.Object jsonArrPop(java.lang.String key)
jsonArrPop in interface RedisJsonV1Commands@Deprecated
public <T> T jsonArrPop(java.lang.String key,
java.lang.Class<T> clazz)
jsonArrPop in interface RedisJsonV1Commandspublic java.util.List<java.lang.Object> jsonArrPop(java.lang.String key,
Path2 path)
jsonArrPop in interface RedisJsonV2Commands@Deprecated
public java.lang.Object jsonArrPop(java.lang.String key,
Path path)
jsonArrPop in interface RedisJsonV1Commands@Deprecated
public <T> T jsonArrPop(java.lang.String key,
java.lang.Class<T> clazz,
Path path)
jsonArrPop in interface RedisJsonV1Commandspublic java.util.List<java.lang.Object> jsonArrPop(java.lang.String key,
Path2 path,
int index)
jsonArrPop in interface RedisJsonV2Commands@Deprecated
public java.lang.Object jsonArrPop(java.lang.String key,
Path path,
int index)
jsonArrPop in interface RedisJsonV1Commands@Deprecated
public <T> T jsonArrPop(java.lang.String key,
java.lang.Class<T> clazz,
Path path,
int index)
jsonArrPop in interface RedisJsonV1Commands@Deprecated public java.lang.Long jsonArrLen(java.lang.String key)
jsonArrLen in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonArrLen(java.lang.String key,
Path2 path)
jsonArrLen in interface RedisJsonV2Commands@Deprecated
public java.lang.Long jsonArrLen(java.lang.String key,
Path path)
jsonArrLen in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonArrTrim(java.lang.String key,
Path2 path,
int start,
int stop)
jsonArrTrim in interface RedisJsonV2Commands@Deprecated
public java.lang.Long jsonArrTrim(java.lang.String key,
Path path,
int start,
int stop)
jsonArrTrim in interface RedisJsonV1Commands@Deprecated public java.lang.Long jsonObjLen(java.lang.String key)
jsonObjLen in interface RedisJsonV1Commands@Deprecated
public java.lang.Long jsonObjLen(java.lang.String key,
Path path)
jsonObjLen in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonObjLen(java.lang.String key,
Path2 path)
jsonObjLen in interface RedisJsonV2Commands@Deprecated public java.util.List<java.lang.String> jsonObjKeys(java.lang.String key)
jsonObjKeys in interface RedisJsonV1Commands@Deprecated
public java.util.List<java.lang.String> jsonObjKeys(java.lang.String key,
Path path)
jsonObjKeys in interface RedisJsonV1Commandspublic java.util.List<java.util.List<java.lang.String>> jsonObjKeys(java.lang.String key,
Path2 path)
jsonObjKeys in interface RedisJsonV2Commands@Deprecated public long jsonDebugMemory(java.lang.String key)
jsonDebugMemory in interface RedisJsonV1Commands@Deprecated
public long jsonDebugMemory(java.lang.String key,
Path path)
jsonDebugMemory in interface RedisJsonV1Commandspublic java.util.List<java.lang.Long> jsonDebugMemory(java.lang.String key,
Path2 path)
jsonDebugMemory in interface RedisJsonV2Commandspublic java.lang.String tsCreate(java.lang.String key)
RedisTimeSeriesCommandsTS.CREATE keytsCreate in interface RedisTimeSeriesCommandspublic java.lang.String tsCreate(java.lang.String key,
TSCreateParams createParams)
RedisTimeSeriesCommandsTS.CREATE key [RETENTION retentionTime] [ENCODING [UNCOMPRESSED|COMPRESSED]] [CHUNK_SIZE size] [DUPLICATE_POLICY policy] [LABELS label value..]tsCreate in interface RedisTimeSeriesCommandspublic long tsDel(java.lang.String key,
long fromTimestamp,
long toTimestamp)
RedisTimeSeriesCommandsTS.DEL key fromTimestamp toTimestamptsDel in interface RedisTimeSeriesCommandspublic java.lang.String tsAlter(java.lang.String key,
TSAlterParams alterParams)
RedisTimeSeriesCommandsTS.ALTER key [RETENTION retentionTime] [LABELS label value..]tsAlter in interface RedisTimeSeriesCommandspublic long tsAdd(java.lang.String key,
double value)
RedisTimeSeriesCommandsTS.ADD key * valuetsAdd in interface RedisTimeSeriesCommandspublic long tsAdd(java.lang.String key,
long timestamp,
double value)
RedisTimeSeriesCommandsTS.ADD key timestamp valuetsAdd in interface RedisTimeSeriesCommandspublic long tsAdd(java.lang.String key,
long timestamp,
double value,
TSCreateParams createParams)
tsAdd in interface RedisTimeSeriesCommandspublic long tsAdd(java.lang.String key,
long timestamp,
double value,
TSAddParams addParams)
RedisTimeSeriesCommandsTS.ADD key timestamp value
[RETENTION retentionTime]
[ENCODING <COMPRESSED|UNCOMPRESSED>]
[CHUNK_SIZE size]
[DUPLICATE_POLICY policy]
[ON_DUPLICATE policy_ovr]
[LABELS label value..]tsAdd in interface RedisTimeSeriesCommandspublic java.util.List<java.lang.Long> tsMAdd(java.util.Map.Entry<java.lang.String,TSElement>... entries)
RedisTimeSeriesCommandsTS.MADD key timestamp value [key timestamp value ...]tsMAdd in interface RedisTimeSeriesCommandsentries - key, timestamp, valuepublic long tsIncrBy(java.lang.String key,
double value)
tsIncrBy in interface RedisTimeSeriesCommandspublic long tsIncrBy(java.lang.String key,
double value,
long timestamp)
tsIncrBy in interface RedisTimeSeriesCommandspublic long tsIncrBy(java.lang.String key,
double addend,
TSIncrByParams incrByParams)
RedisTimeSeriesCommandsTS.INCRBY key addend
[TIMESTAMP timestamp]
[RETENTION retentionPeriod]
[ENCODING <COMPRESSED|UNCOMPRESSED>]
[CHUNK_SIZE size]
[DUPLICATE_POLICY policy]
[IGNORE ignoreMaxTimediff ignoreMaxValDiff]
[LABELS [label value ...]]tsIncrBy in interface RedisTimeSeriesCommandspublic long tsDecrBy(java.lang.String key,
double value)
tsDecrBy in interface RedisTimeSeriesCommandspublic long tsDecrBy(java.lang.String key,
double value,
long timestamp)
tsDecrBy in interface RedisTimeSeriesCommandspublic long tsDecrBy(java.lang.String key,
double subtrahend,
TSDecrByParams decrByParams)
RedisTimeSeriesCommandsTS.DECRBY key subtrahend
[TIMESTAMP timestamp]
[RETENTION retentionPeriod]
[ENCODING <COMPRESSED|UNCOMPRESSED>]
[CHUNK_SIZE size]
[DUPLICATE_POLICY policy]
[IGNORE ignoreMaxTimediff ignoreMaxValDiff]
[LABELS [label value ...]]tsDecrBy in interface RedisTimeSeriesCommandspublic java.util.List<TSElement> tsRange(java.lang.String key, long fromTimestamp, long toTimestamp)
RedisTimeSeriesCommandsTS.RANGE key fromTimestamp toTimestamptsRange in interface RedisTimeSeriesCommandspublic java.util.List<TSElement> tsRange(java.lang.String key, TSRangeParams rangeParams)
RedisTimeSeriesCommandsTS.RANGE key fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS ts...]
[FILTER_BY_VALUE min max]
[COUNT count]
[[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]tsRange in interface RedisTimeSeriesCommandspublic java.util.List<TSElement> tsRevRange(java.lang.String key, long fromTimestamp, long toTimestamp)
RedisTimeSeriesCommandsTS.REVRANGE key fromTimestamp toTimestamptsRevRange in interface RedisTimeSeriesCommandspublic java.util.List<TSElement> tsRevRange(java.lang.String key, TSRangeParams rangeParams)
RedisTimeSeriesCommandsTS.REVRANGE key fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS TS...]
[FILTER_BY_VALUE min max]
[COUNT count]
[[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]tsRevRange in interface RedisTimeSeriesCommandspublic java.util.Map<java.lang.String,TSMRangeElements> tsMRange(long fromTimestamp, long toTimestamp, java.lang.String... filters)
RedisTimeSeriesCommandsTS.MRANGE fromTimestamp toTimestamp FILTER filter...tsMRange in interface RedisTimeSeriesCommandspublic java.util.Map<java.lang.String,TSMRangeElements> tsMRange(TSMRangeParams multiRangeParams)
RedisTimeSeriesCommandsTS.MRANGE fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS ts...]
[FILTER_BY_VALUE min max]
[WITHLABELS | SELECTED_LABELS label...]
[COUNT count]
[[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]
FILTER filter...
[GROUPBY label REDUCE reducer]tsMRange in interface RedisTimeSeriesCommandspublic java.util.Map<java.lang.String,TSMRangeElements> tsMRevRange(long fromTimestamp, long toTimestamp, java.lang.String... filters)
RedisTimeSeriesCommandsTS.MREVRANGE fromTimestamp toTimestamp FILTER filter...tsMRevRange in interface RedisTimeSeriesCommandspublic java.util.Map<java.lang.String,TSMRangeElements> tsMRevRange(TSMRangeParams multiRangeParams)
RedisTimeSeriesCommandsTS.MREVRANGE fromTimestamp toTimestamp
[LATEST]
[FILTER_BY_TS TS...]
[FILTER_BY_VALUE min max]
[WITHLABELS | SELECTED_LABELS label...]
[COUNT count]
[[ALIGN value] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]
FILTER filter...
[GROUPBY label REDUCE reducer]tsMRevRange in interface RedisTimeSeriesCommandspublic TSElement tsGet(java.lang.String key)
RedisTimeSeriesCommandsTS.GET keytsGet in interface RedisTimeSeriesCommandskey - the keypublic TSElement tsGet(java.lang.String key, TSGetParams getParams)
RedisTimeSeriesCommandsTS.GET key [LATEST]tsGet in interface RedisTimeSeriesCommandskey - the keygetParams - optional argumentspublic java.util.Map<java.lang.String,TSMGetElement> tsMGet(TSMGetParams multiGetParams, java.lang.String... filters)
RedisTimeSeriesCommandsTS.MGET [LATEST] [ WITHLABELS | SELECTED_LABELS label...] FILTER filter...tsMGet in interface RedisTimeSeriesCommandsmultiGetParams - optional argumentsfilters - secondary indexespublic java.lang.String tsCreateRule(java.lang.String sourceKey,
java.lang.String destKey,
AggregationType aggregationType,
long timeBucket)
RedisTimeSeriesCommandsTS.CREATERULE sourceKey destKey AGGREGATION aggregationType timeBuckettsCreateRule in interface RedisTimeSeriesCommandspublic java.lang.String tsCreateRule(java.lang.String sourceKey,
java.lang.String destKey,
AggregationType aggregationType,
long bucketDuration,
long alignTimestamp)
RedisTimeSeriesCommandsTS.CREATERULE sourceKey destKey AGGREGATION aggregationType bucketDuration [alignTimestamp]tsCreateRule in interface RedisTimeSeriesCommandspublic java.lang.String tsDeleteRule(java.lang.String sourceKey,
java.lang.String destKey)
RedisTimeSeriesCommandsTS.DELETERULE sourceKey destKeytsDeleteRule in interface RedisTimeSeriesCommandspublic java.util.List<java.lang.String> tsQueryIndex(java.lang.String... filters)
RedisTimeSeriesCommandsTS.QUERYINDEX filter...tsQueryIndex in interface RedisTimeSeriesCommandspublic TSInfo tsInfo(java.lang.String key)
tsInfo in interface RedisTimeSeriesCommandspublic TSInfo tsInfoDebug(java.lang.String key)
tsInfoDebug in interface RedisTimeSeriesCommandspublic java.lang.String bfReserve(java.lang.String key,
double errorRate,
long capacity)
BloomFilterCommandsBF.RESERVE {key} {error_rate} {capacity}bfReserve in interface BloomFilterCommandspublic java.lang.String bfReserve(java.lang.String key,
double errorRate,
long capacity,
BFReserveParams reserveParams)
BloomFilterCommandsBF.RESERVE {key} {error_rate} {capacity} [EXPANSION {expansion}] [NONSCALING]bfReserve in interface BloomFilterCommandspublic boolean bfAdd(java.lang.String key,
java.lang.String item)
BloomFilterCommandsBF.ADD {key} {item}bfAdd in interface BloomFilterCommandspublic java.util.List<java.lang.Boolean> bfMAdd(java.lang.String key,
java.lang.String... items)
BloomFilterCommandsBF.MADD {key} {item ...}bfMAdd in interface BloomFilterCommandspublic java.util.List<java.lang.Boolean> bfInsert(java.lang.String key,
java.lang.String... items)
BloomFilterCommandsBF.INSERT {key} ITEMS {item ...}bfInsert in interface BloomFilterCommandspublic java.util.List<java.lang.Boolean> bfInsert(java.lang.String key,
BFInsertParams insertParams,
java.lang.String... items)
BloomFilterCommandsBF.INSERT {key} [CAPACITY {cap}] [ERROR {error}] [EXPANSION {expansion}] [NOCREATE]
[NONSCALING] ITEMS {item ...}bfInsert in interface BloomFilterCommandspublic boolean bfExists(java.lang.String key,
java.lang.String item)
BloomFilterCommandsBF.EXISTS {key} {item}bfExists in interface BloomFilterCommandspublic java.util.List<java.lang.Boolean> bfMExists(java.lang.String key,
java.lang.String... items)
BloomFilterCommandsBF.MEXISTS {key} {item ...}bfMExists in interface BloomFilterCommandspublic java.util.Map.Entry<java.lang.Long,byte[]> bfScanDump(java.lang.String key,
long iterator)
BloomFilterCommandsBF.SCANDUMP {key} {iterator}bfScanDump in interface BloomFilterCommandspublic java.lang.String bfLoadChunk(java.lang.String key,
long iterator,
byte[] data)
BloomFilterCommandsBF.LOADCHUNK {key} {iterator} {data}bfLoadChunk in interface BloomFilterCommandspublic long bfCard(java.lang.String key)
bfCard in interface BloomFilterCommandspublic java.util.Map<java.lang.String,java.lang.Object> bfInfo(java.lang.String key)
bfInfo in interface BloomFilterCommandspublic java.lang.String cfReserve(java.lang.String key,
long capacity)
CuckooFilterCommandscfReserve in interface CuckooFilterCommandskey - The name of the filterpublic java.lang.String cfReserve(java.lang.String key,
long capacity,
CFReserveParams reserveParams)
CuckooFilterCommandscfReserve in interface CuckooFilterCommandskey - The name of the filterreserveParams - An instance of CFReserveParams containing the optionspublic boolean cfAdd(java.lang.String key,
java.lang.String item)
CuckooFilterCommandscfAdd in interface CuckooFilterCommandskey - The name of the filteritem - The item to addpublic boolean cfAddNx(java.lang.String key,
java.lang.String item)
CuckooFilterCommandscfAddNx in interface CuckooFilterCommandskey - The name of the filteritem - The item to addpublic java.util.List<java.lang.Boolean> cfInsert(java.lang.String key,
java.lang.String... items)
CuckooFilterCommandscfInsert in interface CuckooFilterCommandskey - The name of the filteritems - One or more items to addpublic java.util.List<java.lang.Boolean> cfInsert(java.lang.String key,
CFInsertParams insertParams,
java.lang.String... items)
CuckooFilterCommandscfInsert in interface CuckooFilterCommandskey - The name of the filterinsertParams - An instance of CFInsertParams containing the optionsitems - One or more items to addpublic java.util.List<java.lang.Boolean> cfInsertNx(java.lang.String key,
java.lang.String... items)
CuckooFilterCommandscfInsertNx in interface CuckooFilterCommandskey - The name of the filteritems - One or more items to addpublic java.util.List<java.lang.Boolean> cfInsertNx(java.lang.String key,
CFInsertParams insertParams,
java.lang.String... items)
CuckooFilterCommandscfInsertNx in interface CuckooFilterCommandskey - The name of the filterinsertParams - An instance of CFInsertParams containing the options
(CAPACITY/NOCREATE)items - One or more items to addpublic boolean cfExists(java.lang.String key,
java.lang.String item)
CuckooFilterCommandscfExists in interface CuckooFilterCommandskey - The name of the filteritem - The item to check forpublic java.util.List<java.lang.Boolean> cfMExists(java.lang.String key,
java.lang.String... items)
CuckooFilterCommandsCF.MEXISTS {key} {item ...}cfMExists in interface CuckooFilterCommandskey - The name of the filteritems - Items to check for (non empty sequence)public boolean cfDel(java.lang.String key,
java.lang.String item)
CuckooFilterCommandscfDel in interface CuckooFilterCommandskey - The name of the filteritem - The item to delete from the filterpublic long cfCount(java.lang.String key,
java.lang.String item)
CuckooFilterCommandscfCount in interface CuckooFilterCommandskey - The name of the filteritem - The item to countpublic java.util.Map.Entry<java.lang.Long,byte[]> cfScanDump(java.lang.String key,
long iterator)
CuckooFilterCommandscfScanDump in interface CuckooFilterCommandskey - Name of the filteriterator - This is either 0, or the iterator from a previous invocation
of this commandpublic java.lang.String cfLoadChunk(java.lang.String key,
long iterator,
byte[] data)
CuckooFilterCommandscfLoadChunk in interface CuckooFilterCommandskey - Name of the filter to restoreiterator - Iterator from CF.SCANDUMPdata - Data from CF.SCANDUMPpublic java.util.Map<java.lang.String,java.lang.Object> cfInfo(java.lang.String key)
CuckooFilterCommandscfInfo in interface CuckooFilterCommandskey - Name of the filter to restorepublic java.lang.String cmsInitByDim(java.lang.String key,
long width,
long depth)
CountMinSketchCommandscmsInitByDim in interface CountMinSketchCommandskey - The name of the sketchwidth - Number of counter in each array. Reduces the error sizedepth - Number of counter-arrays. Reduces the probability for an error
of a certain size (percentage of total countpublic java.lang.String cmsInitByProb(java.lang.String key,
double error,
double probability)
CountMinSketchCommandscmsInitByProb in interface CountMinSketchCommandskey - The name of the sketch.error - Estimate size of error. The error is a percent of total
counted items. This effects the width of the sketch.probability - The desired probability for inflated count. This should be
a decimal value between 0 and 1. This effects the depth of
the sketch. For example, for a desired false positive rate
of 0.1% (1 in 1000), error_rate should be set to 0.001.
The closer this number is to zero, the greater the memory
consumption per item and the more CPU usage per operation.public java.util.List<java.lang.Long> cmsIncrBy(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Long> itemIncrements)
CountMinSketchCommandscmsIncrBy in interface CountMinSketchCommandskey - The name of the sketchitemIncrements - a Map of the items to be increased and their integer
incrementpublic java.util.List<java.lang.Long> cmsQuery(java.lang.String key,
java.lang.String... items)
CountMinSketchCommandscmsQuery in interface CountMinSketchCommandskey - The name of the sketchitems - The items for which to retrieve the countspublic java.lang.String cmsMerge(java.lang.String destKey,
java.lang.String... keys)
CountMinSketchCommandscmsMerge in interface CountMinSketchCommandsdestKey - The name of destination sketch. Must be initialized.keys - The sketches to be mergedpublic java.lang.String cmsMerge(java.lang.String destKey,
java.util.Map<java.lang.String,java.lang.Long> keysAndWeights)
CountMinSketchCommandscmsMerge in interface CountMinSketchCommandsdestKey - The name of destination sketch. Must be initialized.keysAndWeights - A map of keys and weights used to multiply the sketch.public java.util.Map<java.lang.String,java.lang.Object> cmsInfo(java.lang.String key)
CountMinSketchCommandscmsInfo in interface CountMinSketchCommandskey - The name of the sketchpublic java.lang.String topkReserve(java.lang.String key,
long topk)
TopKFilterCommandsTOPK.RESERVE {key} {topk}topkReserve in interface TopKFilterCommandspublic java.lang.String topkReserve(java.lang.String key,
long topk,
long width,
long depth,
double decay)
TopKFilterCommandsTOPK.RESERVE {key} {topk} [{width} {depth} {decay}]topkReserve in interface TopKFilterCommandspublic java.util.List<java.lang.String> topkAdd(java.lang.String key,
java.lang.String... items)
TopKFilterCommandsTOPK.ADD {key} {item ...}topkAdd in interface TopKFilterCommandspublic java.util.List<java.lang.String> topkIncrBy(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Long> itemIncrements)
TopKFilterCommandsTOPK.INCRBY {key} {item} {increment} [{item} {increment} ...]topkIncrBy in interface TopKFilterCommandsitemIncrements - item and increment pairspublic java.util.List<java.lang.Boolean> topkQuery(java.lang.String key,
java.lang.String... items)
TopKFilterCommandsTOPK.QUERY {key} {item ...}topkQuery in interface TopKFilterCommandspublic java.util.List<java.lang.String> topkList(java.lang.String key)
TopKFilterCommandsTOPK.LIST {key}topkList in interface TopKFilterCommandspublic java.util.Map<java.lang.String,java.lang.Long> topkListWithCount(java.lang.String key)
TopKFilterCommandsTOPK.LIST {key} WITHCOUNTtopkListWithCount in interface TopKFilterCommandspublic java.util.Map<java.lang.String,java.lang.Object> topkInfo(java.lang.String key)
TopKFilterCommandsTOPK.INFO {key}topkInfo in interface TopKFilterCommandspublic java.lang.String tdigestCreate(java.lang.String key)
TDigestSketchCommandsTDIGEST.CREATE keytdigestCreate in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)public java.lang.String tdigestCreate(java.lang.String key,
int compression)
TDigestSketchCommandsTDIGEST.CREATE key [compression]tdigestCreate in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)compression - The compression parameter. 100 is a common value for normal uses. 1000 is extremely large.public java.lang.String tdigestReset(java.lang.String key)
TDigestSketchCommandsTDIGEST.RESET keytdigestReset in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)public java.lang.String tdigestMerge(java.lang.String destinationKey,
java.lang.String... sourceKeys)
TDigestSketchCommandsTDIGEST.MERGE destination-key numkeys source-key [source-key ...]tdigestMerge in interface TDigestSketchCommandsdestinationKey - Sketch to copy observation values to (a t-digest data structure)sourceKeys - Sketch(es) to copy observation values from (a t-digest data structure)public java.lang.String tdigestMerge(TDigestMergeParams mergeParams, java.lang.String destinationKey, java.lang.String... sourceKeys)
TDigestSketchCommandsTDIGEST.MERGE destination-key numkeys source-key [source-key ...]
[COMPRESSION compression] [OVERRIDE]tdigestMerge in interface TDigestSketchCommandsmergeParams - compression and override optionsdestinationKey - Sketch to copy observation values to (a t-digest data structure)sourceKeys - Sketch(es) to copy observation values from (a t-digest data structure)public java.util.Map<java.lang.String,java.lang.Object> tdigestInfo(java.lang.String key)
TDigestSketchCommandsTDIGEST.INFO keytdigestInfo in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)public java.lang.String tdigestAdd(java.lang.String key,
double... values)
TDigestSketchCommandsTDIGEST.ADD key value weight [ value weight ...]tdigestAdd in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)values - The value of the observation (floating-point)public java.util.List<java.lang.Double> tdigestCDF(java.lang.String key,
double... values)
TDigestSketchCommandsTDIGEST.CDF key value [value ...]tdigestCDF in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)values - upper limit of observation value, for which the fraction of all observations added which are ≤ valuepublic java.util.List<java.lang.Double> tdigestQuantile(java.lang.String key,
double... quantiles)
TDigestSketchCommandsTDIGEST.QUANTILE key quantile [quantile ...]tdigestQuantile in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)quantiles - The desired fraction(s) (between 0 and 1 inclusively)public double tdigestMin(java.lang.String key)
TDigestSketchCommandsTDIGEST.MIN keytdigestMin in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)public double tdigestMax(java.lang.String key)
TDigestSketchCommandsTDIGEST.MAX keytdigestMax in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)public double tdigestTrimmedMean(java.lang.String key,
double lowCutQuantile,
double highCutQuantile)
TDigestSketchCommandsTDIGEST.TRIMMED_MEAN key low_cut_quantile high_cut_quantiletdigestTrimmedMean in interface TDigestSketchCommandskey - The name of the sketch (a t-digest data structure)lowCutQuantile - Exclude observation values lower than this quantilehighCutQuantile - Exclude observation values higher than this quantilepublic java.util.List<java.lang.Long> tdigestRank(java.lang.String key,
double... values)
tdigestRank in interface TDigestSketchCommandspublic java.util.List<java.lang.Long> tdigestRevRank(java.lang.String key,
double... values)
tdigestRevRank in interface TDigestSketchCommandspublic java.util.List<java.lang.Double> tdigestByRank(java.lang.String key,
long... ranks)
tdigestByRank in interface TDigestSketchCommandspublic java.util.List<java.lang.Double> tdigestByRevRank(java.lang.String key,
long... ranks)
tdigestByRevRank in interface TDigestSketchCommandspublic AbstractPipeline pipelined()
public AbstractTransaction multi()
public AbstractTransaction transaction(boolean doMulti)
doMulti - false should be set to enable manual WATCH, UNWATCH and MULTIpublic java.lang.Object sendCommand(ProtocolCommand cmd)
public java.lang.Object sendCommand(ProtocolCommand cmd, byte[]... args)
public java.lang.Object sendBlockingCommand(ProtocolCommand cmd, byte[]... args)
public java.lang.Object sendCommand(ProtocolCommand cmd, java.lang.String... args)
public java.lang.Object sendBlockingCommand(ProtocolCommand cmd, java.lang.String... args)
public java.lang.Object sendCommand(byte[] sampleKey,
ProtocolCommand cmd,
byte[]... args)
public java.lang.Object sendBlockingCommand(byte[] sampleKey,
ProtocolCommand cmd,
byte[]... args)
public java.lang.Object sendCommand(java.lang.String sampleKey,
ProtocolCommand cmd,
java.lang.String... args)
public java.lang.Object sendBlockingCommand(java.lang.String sampleKey,
ProtocolCommand cmd,
java.lang.String... args)
public java.lang.Object executeCommand(CommandArguments args)
@Experimental public void setKeyArgumentPreProcessor(CommandKeyArgumentPreProcessor keyPreProcessor)
public void setJsonObjectMapper(JsonObjectMapper jsonObjectMapper)
public void setDefaultSearchDialect(int dialect)
public boolean vadd(java.lang.String key,
float[] vector,
java.lang.String element)
VectorSetCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vadd in interface VectorSetCommandskey - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setpublic boolean vadd(java.lang.String key,
float[] vector,
java.lang.String element,
VAddParams params)
VectorSetCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vadd in interface VectorSetCommandskey - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setparams - additional parameters for the VADD commandpublic boolean vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element)
VectorSetCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vaddFP32 in interface VectorSetCommandskey - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setpublic boolean vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element,
VAddParams params)
VectorSetCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vaddFP32 in interface VectorSetCommandskey - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setparams - additional parameters for the VADD commandpublic boolean vadd(java.lang.String key,
float[] vector,
java.lang.String element,
int reduceDim,
VAddParams params)
VectorSetCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vadd in interface VectorSetCommandskey - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setreduceDim - the target dimension after reduction using random projectionparams - additional parameters for the VADD commandpublic boolean vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element,
int reduceDim,
VAddParams params)
VectorSetCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vaddFP32 in interface VectorSetCommandskey - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setreduceDim - the target dimension after reduction using random projectionparams - additional parameters for the VADD commandpublic java.util.List<java.lang.String> vsim(java.lang.String key,
float[] vector)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsim in interface VectorSetCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referencepublic java.util.List<java.lang.String> vsim(java.lang.String key,
float[] vector,
VSimParams params)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsim in interface VectorSetCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM commandpublic java.util.Map<java.lang.String,java.lang.Double> vsimWithScores(java.lang.String key,
float[] vector,
VSimParams params)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimWithScores in interface VectorSetCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES will be automatically
added)public java.util.Map<java.lang.String,VSimScoreAttribs> vsimWithScoresAndAttribs(java.lang.String key, float[] vector, VSimParams params)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimWithScoresAndAttribs in interface VectorSetCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES and WITHATTRIBS will be
automatically added)public java.util.List<java.lang.String> vsimByElement(java.lang.String key,
java.lang.String element)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElement in interface VectorSetCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referencepublic java.util.List<java.lang.String> vsimByElement(java.lang.String key,
java.lang.String element,
VSimParams params)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElement in interface VectorSetCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM commandpublic java.util.Map<java.lang.String,java.lang.Double> vsimByElementWithScores(java.lang.String key,
java.lang.String element,
VSimParams params)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElementWithScores in interface VectorSetCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES will be automatically
added)public java.util.Map<java.lang.String,VSimScoreAttribs> vsimByElementWithScoresAndAttribs(java.lang.String key, java.lang.String element, VSimParams params)
VectorSetCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElementWithScoresAndAttribs in interface VectorSetCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES and WITHATTRIBS will be
automatically added)public long vdim(java.lang.String key)
VectorSetCommandsTime complexity: O(1)
vdim in interface VectorSetCommandskey - the name of the key that holds the vector setpublic long vcard(java.lang.String key)
VectorSetCommandsTime complexity: O(1)
vcard in interface VectorSetCommandskey - the name of the key that holds the vector setpublic java.util.List<java.lang.Double> vemb(java.lang.String key,
java.lang.String element)
VectorSetCommandsTime complexity: O(1)
vemb in interface VectorSetCommandskey - the name of the key that holds the vector setelement - the name of the element whose vector you want to retrievepublic RawVector vembRaw(java.lang.String key, java.lang.String element)
VectorSetCommandsTime complexity: O(1)
vembRaw in interface VectorSetCommandskey - the name of the key that holds the vector setelement - the name of the element whose vector you want to retrievepublic boolean vrem(java.lang.String key,
java.lang.String element)
VectorSetCommandsTime complexity: O(log(N)) for each element removed, where N is the number of elements in the vector set
vrem in interface VectorSetCommandskey - the name of the key that holds the vector setelement - the name of the element to remove from the vector setpublic java.util.List<java.util.List<java.lang.String>> vlinks(java.lang.String key,
java.lang.String element)
VectorSetCommandsTime complexity: O(1)
vlinks in interface VectorSetCommandskey - the name of the key that holds the vector setelement - the name of the element whose HNSW neighbors you want to inspectpublic java.util.List<java.util.Map<java.lang.String,java.lang.Double>> vlinksWithScores(java.lang.String key,
java.lang.String element)
VectorSetCommandsTime complexity: O(1)
vlinksWithScores in interface VectorSetCommandskey - the name of the key that holds the vector setelement - the name of the element whose HNSW neighbors you want to inspectpublic java.lang.String vrandmember(java.lang.String key)
VectorSetCommandsTime complexity: O(1)
vrandmember in interface VectorSetCommandskey - the name of the key that holds the vector setpublic java.util.List<java.lang.String> vrandmember(java.lang.String key,
int count)
VectorSetCommandsTime complexity: O(N) where N is the absolute value of the count argument
vrandmember in interface VectorSetCommandskey - the name of the key that holds the vector setcount - the number of elements to return. Positive values return distinct elements;
negative values allow duplicatespublic java.lang.String vgetattr(java.lang.String key,
java.lang.String element)
VectorSetCommandsTime complexity: O(1)
vgetattr in interface VectorSetCommandskey - the name of the key that holds the vector setelement - the name of the element whose attributes to retrievepublic boolean vsetattr(java.lang.String key,
java.lang.String element,
java.lang.String attributes)
VectorSetCommandsTime complexity: O(1)
vsetattr in interface VectorSetCommandskey - the name of the key that holds the vector setelement - the name of the element whose attributes to setattributes - the attributes to set as a JSON stringpublic VectorInfo vinfo(java.lang.String key)
VectorSetCommandsTime complexity: O(1)
vinfo in interface VectorSetCommandskey - the name of the key that holds the vector setpublic boolean vadd(byte[] key,
float[] vector,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vadd in interface VectorSetBinaryCommandskey - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setpublic boolean vadd(byte[] key,
float[] vector,
byte[] element,
VAddParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vadd in interface VectorSetBinaryCommandskey - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setparams - additional parameters for the VADD commandpublic boolean vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vaddFP32 in interface VectorSetBinaryCommandskey - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setpublic boolean vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] element,
VAddParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vaddFP32 in interface VectorSetBinaryCommandskey - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setparams - additional parameters for the VADD commandpublic boolean vadd(byte[] key,
float[] vector,
byte[] element,
int reduceDim,
VAddParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vadd in interface VectorSetBinaryCommandskey - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setreduceDim - the target dimension after reduction using random projectionparams - additional parameters for the VADD commandpublic boolean vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] element,
int reduceDim,
VAddParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
vaddFP32 in interface VectorSetBinaryCommandskey - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setreduceDim - the target dimension after reduction using random projectionparams - additional parameters for the VADD commandpublic java.util.List<byte[]> vsim(byte[] key,
float[] vector)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsim in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referencepublic java.util.List<byte[]> vsim(byte[] key,
float[] vector,
VSimParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsim in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM commandpublic java.util.Map<byte[],java.lang.Double> vsimWithScores(byte[] key,
float[] vector,
VSimParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimWithScores in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES will be automatically
added)public java.util.Map<byte[],VSimScoreAttribs> vsimWithScoresAndAttribs(byte[] key, float[] vector, VSimParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimWithScoresAndAttribs in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES and WITHATTRIBS will be
automatically added)public java.util.List<byte[]> vsimByElement(byte[] key,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElement in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referencepublic java.util.List<byte[]> vsimByElement(byte[] key,
byte[] element,
VSimParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElement in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM commandpublic java.util.Map<byte[],java.lang.Double> vsimByElementWithScores(byte[] key,
byte[] element,
VSimParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElementWithScores in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES will be automatically
added)public java.util.Map<byte[],VSimScoreAttribs> vsimByElementWithScoresAndAttribs(byte[] key, byte[] element, VSimParams params)
VectorSetBinaryCommandsTime complexity: O(log(N)) where N is the number of elements in the vector set.
vsimByElementWithScoresAndAttribs in interface VectorSetBinaryCommandskey - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES and WITHATTRIBS will be
automatically added)public long vdim(byte[] key)
VectorSetBinaryCommandsTime complexity: O(1)
vdim in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setpublic long vcard(byte[] key)
VectorSetBinaryCommandsTime complexity: O(1)
vcard in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setpublic java.util.List<java.lang.Double> vemb(byte[] key,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(1)
vemb in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setelement - the name of the element whose vector you want to retrievepublic RawVector vembRaw(byte[] key, byte[] element)
VectorSetBinaryCommandsTime complexity: O(1)
vembRaw in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setelement - the name of the element whose vector you want to retrievepublic boolean vrem(byte[] key,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(log(N)) for each element removed, where N is the number of elements in the vector set
vrem in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setelement - the name of the element to remove from the vector setpublic java.util.List<java.util.List<byte[]>> vlinks(byte[] key,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(1)
vlinks in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setelement - the name of the element whose HNSW neighbors you want to inspectpublic java.util.List<java.util.Map<byte[],java.lang.Double>> vlinksWithScores(byte[] key,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(1)
vlinksWithScores in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setelement - the name of the element whose HNSW neighbors you want to inspectpublic byte[] vrandmember(byte[] key)
VectorSetBinaryCommandsTime complexity: O(1)
vrandmember in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setpublic java.util.List<byte[]> vrandmember(byte[] key,
int count)
VectorSetBinaryCommandsTime complexity: O(N) where N is the absolute value of the count argument
vrandmember in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setcount - the number of elements to return. Positive values return distinct elements;
negative values allow duplicatespublic byte[] vgetattr(byte[] key,
byte[] element)
VectorSetBinaryCommandsTime complexity: O(1)
vgetattr in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setelement - the name of the element whose attributes to retrievepublic boolean vsetattr(byte[] key,
byte[] element,
byte[] attributes)
VectorSetBinaryCommandsTime complexity: O(1)
vsetattr in interface VectorSetBinaryCommandskey - the name of the key that holds the vector setelement - the name of the element whose attributes to setattributes - the attributes to set as a JSON stringCopyright © 2025. All rights reserved.