public interface RedisAdvancedClusterCommands<K,V> extends RedisClusterCommands<K,V>, RedisAdvancedClusterConnection<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 masters.
|
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 masters with pipelining.
|
String |
flushdb()
Remove all keys from the current database on all cluster masters 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() |
List<K> |
keys(K pattern)
Find all keys matching the given pattern on all cluster masters.
|
Long |
keys(KeyStreamingChannel<K> channel,
K pattern)
Find all keys matching the given pattern on all cluster masters.
|
default NodeSelection<K,V> |
masters()
Select all masters.
|
List<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
|
V |
randomkey()
Return a random key from the keyspace on a random master.
|
NodeSelection<K,V> |
readonly(Predicate<RedisClusterNode> predicate)
Select slave nodes by a predicate and keeps a static selection.
|
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()
Select all slaves.
|
default NodeSelection<K,V> |
slaves(Predicate<RedisClusterNode> predicate)
Select all slaves.
|
Long |
touch(K... keys)
Touch one or more keys with pipelining.
|
Long |
unlink(K... keys)
Unlink one or more keys with pipelining.
|
asking, auth, close, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterCountKeysInSlot, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterGetKeysInSlot, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, readOnly, readWrite, setTimeout
dispatch, dispatch, echo, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, waitForReplication
geoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymember
hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hsetnx, hstrlen, hvals, hvals
pfadd, pfcount, pfmerge
dump, expire, expireat, expireat, migrate, migrate, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, rename, renamenx, restore, restore, sort, sort, sort, sort, sortStore, ttl, type
blpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx, rpushx
digest, eval, eval, evalsha, evalsha, scriptExists, scriptLoad
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstore
bzpopmax, bzpopmin, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zincrby, zinterstore, zinterstore, zlexcount, zlexcount, zpopmax, zpopmax, zpopmin, zpopmin, 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, zrangeWithScores, zrangeWithScores, zrank, 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, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunionstore, zunionstore
xack, xadd, xadd, xadd, xadd, xclaim, xclaim, xdel, xgroupCreate, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xlen, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getrange, getset, incr, incrby, incrbyfloat, mget, psetex, set, set, setbit, setex, setnx, setrange, strlen
discard, exec, multi, unwatch, watch
hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hsetnx, hstrlen, hvals, hvals
dump, exists, expire, expireat, expireat, migrate, migrate, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, rename, renamenx, restore, sort, sort, sort, sort, sortStore, ttl, type
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, decr, decrby, get, getbit, getrange, getset, incr, incrby, incrbyfloat, mget, psetex, set, set, setbit, setex, setnx, setrange, strlen
blpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx, rpushx
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstore
zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zincrby, zinterstore, zinterstore, zlexcount, zrange, zrange, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangeWithScores, zrangeWithScores, zrank, zrem, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunionstore, zunionstore
eval, eval, evalsha, evalsha, scriptExists, scriptLoad
bgrewriteaof, bgsave, clientGetname, clientKill, clientKill, clientList, clientPause, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, debugHtstats, debugObject, debugOom, debugSegfault, flushallAsync, flushdbAsync, info, info, lastsave, save, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, sync, time
clientUnblock, debugCrashAndRecover, debugReload, debugRestart, debugSdslen
pfadd, pfcount, pfmerge
geoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymember
digest, discard, dispatch, dispatch, echo, exec, isOpen, multi, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, role, unwatch, waitForReplication, watch
RedisClusterCommands<K,V> getConnection(String nodeId)
RedisAdvancedClusterCommands
, node-connections do not route commands to other cluster nodesgetConnection
in interface RedisAdvancedClusterConnection<K,V>
nodeId
- 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()
.getConnection
in interface RedisAdvancedClusterConnection<K,V>
host
- the hostport
- the portStatefulRedisClusterConnection<K,V> getStatefulConnection()
getStatefulConnection
in interface RedisAdvancedClusterConnection<K,V>
default NodeSelection<K,V> masters()
default NodeSelection<K,V> slaves()
default NodeSelection<K,V> slaves(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>
del
in interface RedisKeysConnection<K,V>
keys
- the keysRedisKeyCommands.del(Object[])
Long unlink(K... keys)
unlink
in interface RedisKeyCommands<K,V>
unlink
in interface RedisKeysConnection<K,V>
keys
- the keysRedisKeyCommands.unlink(Object[])
Long exists(K... keys)
exists
in interface RedisKeyCommands<K,V>
exists
in interface RedisKeysConnection<K,V>
keys
- the keysList<V> mget(K... keys)
mget
in interface RedisStringCommands<K,V>
mget
in interface RedisStringsConnection<K,V>
keys
- the keyRedisStringCommands.mget(Object[])
String mset(Map<K,V> map)
mset
in interface RedisStringCommands<K,V>
mset
in interface RedisStringsConnection<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>
msetnx
in interface RedisStringsConnection<K,V>
map
- the null1
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>
clientSetname
in interface RedisServerConnection<K,V>
name
- the client nameOK
if the connection name was successfully set.RedisServerCommands.clientSetname(Object)
String flushall()
flushall
in interface RedisServerCommands<K,V>
flushall
in interface RedisServerConnection<K,V>
RedisServerCommands.flushall()
String flushdb()
flushdb
in interface RedisServerCommands<K,V>
flushdb
in interface RedisServerConnection<K,V>
RedisServerCommands.flushdb()
Long dbsize()
dbsize
in interface RedisServerCommands<K,V>
dbsize
in interface RedisServerConnection<K,V>
RedisServerCommands.dbsize()
List<K> keys(K pattern)
keys
in interface RedisKeyCommands<K,V>
keys
in interface RedisKeysConnection<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>
keys
in interface RedisKeysConnection<K,V>
channel
- the channelpattern
- the patternpattern
.RedisKeyCommands.keys(KeyStreamingChannel, Object)
V randomkey()
randomkey
in interface RedisKeyCommands<K,V>
randomkey
in interface RedisKeysConnection<K,V>
RedisKeyCommands.randomkey()
String scriptFlush()
scriptFlush
in interface RedisScriptingCommands<K,V>
scriptFlush
in interface RedisScriptingConnection<K,V>
RedisScriptingCommands.scriptFlush()
String scriptKill()
scriptKill
in interface RedisScriptingCommands<K,V>
scriptKill
in interface RedisScriptingConnection<K,V>
RedisScriptingCommands.scriptKill()
void shutdown(boolean save)
shutdown
in interface RedisServerCommands<K,V>
shutdown
in interface RedisServerConnection<K,V>
save
- true force save operationRedisServerCommands.shutdown(boolean)
KeyScanCursor<K> scan()
scan
in interface RedisKeyCommands<K,V>
scan
in interface RedisKeysConnection<K,V>
RedisKeyCommands.scan()
KeyScanCursor<K> scan(ScanArgs scanArgs)
scan
in interface RedisKeyCommands<K,V>
scan
in interface RedisKeysConnection<K,V>
scanArgs
- scan argumentsRedisKeyCommands.scan(ScanArgs)
KeyScanCursor<K> scan(ScanCursor scanCursor, ScanArgs scanArgs)
scan
in interface RedisKeyCommands<K,V>
scan
in interface RedisKeysConnection<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>
scan
in interface RedisKeysConnection<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>
scan
in interface RedisKeysConnection<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>
scan
in interface RedisKeysConnection<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>
scan
in interface RedisKeysConnection<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>
scan
in interface RedisKeysConnection<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>
touch
in interface RedisKeysConnection<K,V>
keys
- the keysCopyright © 2018 lettuce.io. All rights reserved.