public interface RedisAdvancedClusterCommands<K,V> extends RedisClusterCommands<K,V>
Modifier and Type | Method and Description |
---|---|
default NodeSelection<K,V> |
all()
Select all known cluster nodes.
|
String |
clientSetname(K name)
Set the current connection name on all known cluster nodes with pipelining.
|
Long |
dbsize()
Return the number of keys in the selected database on all cluster upstream nodes.
|
Long |
del(K... keys)
Delete one or more keys with pipelining.
|
Long |
exists(K... keys)
Determine how many keys exist with pipelining.
|
String |
flushall()
Remove all keys from all databases on all cluster upstream nodes with pipelining.
|
String |
flushallAsync()
Remove all keys asynchronously from all databases on all cluster upstream nodes with pipelining.
|
String |
flushdb()
Remove all keys from the current database on all cluster upstream nodes with pipelining.
|
RedisClusterCommands<K,V> |
getConnection(String nodeId)
Retrieve a connection to the specified cluster node using the nodeId.
|
RedisClusterCommands<K,V> |
getConnection(String host,
int port)
Retrieve a connection to the specified cluster node using host and port.
|
StatefulRedisClusterConnection<K,V> |
getStatefulConnection()
Deprecated.
|
List<K> |
keys(K pattern)
Find all keys matching the given pattern on all cluster upstream nodes.
|
Long |
keys(KeyStreamingChannel<K> channel,
K pattern)
Find all keys matching the given pattern on all cluster upstream nodes.
|
default NodeSelection<K,V> |
masters()
Deprecated.
since 6.0 in favor of
upstream() . |
List<KeyValue<K,V>> |
mget(K... keys)
Get the values of all the given keys with pipelining.
|
String |
mset(Map<K,V> map)
Set multiple keys to multiple values with pipelining.
|
Boolean |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist with pipelining.
|
NodeSelection<K,V> |
nodes(Predicate<RedisClusterNode> predicate)
Select nodes by a predicate and keeps a static selection.
|
NodeSelection<K,V> |
nodes(Predicate<RedisClusterNode> predicate,
boolean dynamic)
Select nodes by a predicate
|
K |
randomkey()
Return a random key from the keyspace on a random master.
|
NodeSelection<K,V> |
readonly(Predicate<RedisClusterNode> predicate)
Select replica nodes by a predicate and keeps a static selection.
|
default NodeSelection<K,V> |
replicas()
Select all replicas.
|
default NodeSelection<K,V> |
replicas(Predicate<RedisClusterNode> predicate)
Select all replicas.
|
KeyScanCursor<K> |
scan()
Incrementally iterate the keys space over the whole Cluster.
|
StreamScanCursor |
scan(KeyStreamingChannel<K> channel)
Incrementally iterate the keys space over the whole Cluster.
|
StreamScanCursor |
scan(KeyStreamingChannel<K> channel,
ScanArgs scanArgs)
Incrementally iterate the keys space over the whole Cluster.
|
StreamScanCursor |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor)
Incrementally iterate the keys space over the whole Cluster.
|
StreamScanCursor |
scan(KeyStreamingChannel<K> channel,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space over the whole Cluster.
|
KeyScanCursor<K> |
scan(ScanArgs scanArgs)
Incrementally iterate the keys space over the whole Cluster.
|
KeyScanCursor<K> |
scan(ScanCursor scanCursor)
Incrementally iterate the keys space over the whole Cluster.
|
KeyScanCursor<K> |
scan(ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate the keys space over the whole Cluster.
|
String |
scriptFlush()
Remove all the scripts from the script cache on all cluster nodes.
|
String |
scriptKill()
Kill the script currently in execution on all cluster nodes.
|
void |
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down all nodes of the cluster.
|
default NodeSelection<K,V> |
slaves()
Deprecated.
since 5.2, use
replicas() |
default NodeSelection<K,V> |
slaves(Predicate<RedisClusterNode> predicate)
Deprecated.
since 5.2, use
replicas(Predicate) |
Long |
touch(K... keys)
Touch one or more keys with pipelining.
|
Long |
unlink(K... keys)
Unlink one or more keys with pipelining.
|
default NodeSelection<K,V> |
upstream()
Select all upstream nodes.
|
asking, auth, auth, clusterAddSlots, clusterAddSlotsRange, clusterBumpepoch, clusterCountFailureReports, clusterCountKeysInSlot, clusterDelSlots, clusterDelSlotsRange, clusterFailover, clusterFailover, clusterFlushslots, clusterForget, clusterGetKeysInSlot, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicas, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterShards, clusterSlaves, clusterSlots, readOnly, readWrite, setTimeout
dispatch, dispatch, echo, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, waitForReplication
aclCat, aclCat, aclDeluser, aclDryRun, aclDryRun, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami
fcall, fcall, fcallReadOnly, fcallReadOnly, functionDump, functionFlush, functionKill, functionList, functionList, functionLoad, functionLoad, functionRestore, functionRestore
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymember, geosearch, geosearch, geosearchstore
hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvals
pfadd, pfcount, pfmerge
copy, copy, dump, expire, expire, expire, expire, expireat, expireat, expireat, expireat, expireat, expireat, expiretime, migrate, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpireat, pexpiretime, pttl, rename, renamenx, restore, restore, sort, sort, sort, sort, sortReadOnly, sortReadOnly, sortReadOnly, sortReadOnly, sortStore, ttl, type
blmove, blmove, blmpop, blmpop, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, lindex, linsert, llen, lmove, lmpop, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpop, rpoplpush, rpush, rpushx
digest, digest, eval, eval, eval, eval, evalReadOnly, evalsha, evalsha, evalshaReadOnly, scriptExists, scriptFlush, scriptLoad, scriptLoad
bgrewriteaof, bgsave, clientCaching, clientGetname, clientGetredir, clientId, clientInfo, clientKill, clientKill, clientList, clientList, clientNoEvict, clientPause, clientSetinfo, clientTracking, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configGet, configResetstat, configRewrite, configSet, configSet, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushall, flushdb, flushdbAsync, info, info, lastsave, memoryUsage, replicaof, replicaofNoOne, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, time
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sintercard, sintercard, sinterstore, sismember, smembers, smembers, smismember, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstore
bzmpop, bzmpop, bzmpop, bzmpop, bzpopmax, bzpopmax, bzpopmin, bzpopmin, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zintercard, zintercard, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmpop, zmpop, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrangebylex, zrangebylex, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangestore, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, zrankWithScore, zrem, zremrangebylex, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebylex, zrevrangebylex, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangestore, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zrevrankWithScore, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScores
xack, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrim
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getdel, getex, getrange, getset, incr, incrby, incrbyfloat, mget, psetex, set, set, setbit, setex, setGet, setGet, setnx, setrange, stralgoLcs, strlen
RedisClusterCommands<K,V> getConnection(String nodeId)
RedisAdvancedClusterCommands
, node-connections do not route commands to other cluster nodesnodeId
- the node IdRedisClusterCommands<K,V> getConnection(String host, int port)
RedisAdvancedClusterCommands
, node-connections do not route commands to other cluster nodes. Host and port
connections are verified by default for cluster membership, see
ClusterClientOptions.isValidateClusterNodeMembership()
.host
- the hostport
- the port@Deprecated StatefulRedisClusterConnection<K,V> getStatefulConnection()
@Deprecated default NodeSelection<K,V> masters()
upstream()
.default NodeSelection<K,V> upstream()
@Deprecated default NodeSelection<K,V> slaves()
replicas()
@Deprecated default NodeSelection<K,V> slaves(Predicate<RedisClusterNode> predicate)
replicas(Predicate)
predicate
- Predicate to filter nodesdefault NodeSelection<K,V> replicas()
default NodeSelection<K,V> replicas(Predicate<RedisClusterNode> predicate)
predicate
- Predicate to filter nodesdefault NodeSelection<K,V> all()
NodeSelection<K,V> readonly(Predicate<RedisClusterNode> predicate)
NodeSelectionSupport
does not change when the cluster view changes.predicate
- Predicate to filter nodespredicate
NodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate)
NodeSelectionSupport
does
not change when the cluster view changes.predicate
- Predicate to filter nodespredicate
NodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, boolean dynamic)
predicate
- Predicate to filter nodesdynamic
- Defines, whether the set of nodes within the NodeSelectionSupport
can change when the cluster view
changes.predicate
Long del(K... keys)
del
in interface RedisKeyCommands<K,V>
keys
- the keysRedisKeyCommands.del(Object[])
Long unlink(K... keys)
unlink
in interface RedisKeyCommands<K,V>
keys
- the keysRedisKeyCommands.unlink(Object[])
Long exists(K... keys)
exists
in interface RedisKeyCommands<K,V>
keys
- the keysList<KeyValue<K,V>> mget(K... keys)
mget
in interface RedisStringCommands<K,V>
keys
- the keyRedisStringCommands.mget(Object[])
String mset(Map<K,V> map)
mset
in interface RedisStringCommands<K,V>
map
- the mapOK
since MSET
can't fail.RedisStringCommands.mset(Map)
Boolean msetnx(Map<K,V> map)
msetnx
in interface RedisStringCommands<K,V>
map
- the map1
if the all the keys were set. 0
if no key was set (at least one key already existed).RedisStringCommands.msetnx(Map)
String clientSetname(K name)
clientSetname
in interface RedisServerCommands<K,V>
name
- the client nameOK
if the connection name was successfully set.RedisServerCommands.clientSetname(Object)
String flushall()
flushall
in interface RedisServerCommands<K,V>
RedisServerCommands.flushall()
String flushallAsync()
flushallAsync
in interface RedisServerCommands<K,V>
RedisServerCommands.flushallAsync()
String flushdb()
flushdb
in interface RedisServerCommands<K,V>
RedisServerCommands.flushdb()
Long dbsize()
dbsize
in interface RedisServerCommands<K,V>
RedisServerCommands.dbsize()
List<K> keys(K pattern)
keys
in interface RedisKeyCommands<K,V>
pattern
- the pattern type: patternkey (pattern)pattern
.RedisKeyCommands.keys(Object)
Long keys(KeyStreamingChannel<K> channel, K pattern)
keys
in interface RedisKeyCommands<K,V>
channel
- the channelpattern
- the patternpattern
.RedisKeyCommands.keys(KeyStreamingChannel, Object)
K randomkey()
randomkey
in interface RedisKeyCommands<K,V>
null
when the database is empty.RedisKeyCommands.randomkey()
String scriptFlush()
scriptFlush
in interface RedisScriptingCommands<K,V>
RedisScriptingCommands.scriptFlush()
String scriptKill()
scriptKill
in interface RedisScriptingCommands<K,V>
RedisScriptingCommands.scriptKill()
void shutdown(boolean save)
shutdown
in interface RedisServerCommands<K,V>
save
- true
force save operationRedisServerCommands.shutdown(boolean)
KeyScanCursor<K> scan()
scan
in interface RedisKeyCommands<K,V>
RedisKeyCommands.scan()
KeyScanCursor<K> scan(ScanArgs scanArgs)
scan
in interface RedisKeyCommands<K,V>
scanArgs
- scan argumentsRedisKeyCommands.scan(ScanArgs)
KeyScanCursor<K> scan(ScanCursor scanCursor, ScanArgs scanArgs)
scan
in interface RedisKeyCommands<K,V>
scanCursor
- cursor to resume the scan. It's required to reuse the scanCursor
instance from the previous
scan()
call.scanArgs
- scan argumentsRedisKeyCommands.scan(ScanCursor, ScanArgs)
KeyScanCursor<K> scan(ScanCursor scanCursor)
scan
in interface RedisKeyCommands<K,V>
scanCursor
- cursor to resume the scan. It's required to reuse the scanCursor
instance from the previous
scan()
call.RedisKeyCommands.scan(ScanCursor)
StreamScanCursor scan(KeyStreamingChannel<K> channel)
scan
in interface RedisKeyCommands<K,V>
channel
- streaming channel that receives a call for every keyRedisKeyCommands.scan(KeyStreamingChannel)
StreamScanCursor scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
scan
in interface RedisKeyCommands<K,V>
channel
- streaming channel that receives a call for every keyscanArgs
- scan argumentsRedisKeyCommands.scan(KeyStreamingChannel, ScanArgs)
StreamScanCursor scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
scan
in interface RedisKeyCommands<K,V>
channel
- streaming channel that receives a call for every keyscanCursor
- cursor to resume the scan. It's required to reuse the scanCursor
instance from the previous
scan()
call.scanArgs
- scan argumentsRedisKeyCommands.scan(KeyStreamingChannel, ScanCursor, ScanArgs)
StreamScanCursor scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
scan
in interface RedisKeyCommands<K,V>
channel
- streaming channel that receives a call for every keyscanCursor
- cursor to resume the scan. It's required to reuse the scanCursor
instance from the previous
scan()
call.RedisKeyCommands.scan(ScanCursor, ScanArgs)
Long touch(K... keys)
touch
in interface RedisKeyCommands<K,V>
keys
- the keysCopyright © 2023 lettuce.io. All rights reserved.