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.
|
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 the nodeId.
|
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(java.util.function.Predicate<RedisClusterNode> predicate)
Select nodes by a predicate and keeps a static selection.
|
NodeSelection<K,V> |
nodes(java.util.function.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(java.util.function.Predicate<RedisClusterNode> predicate)
Select slave nodes by a predicate and keeps a static selection.
|
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(java.util.function.Predicate<RedisClusterNode> predicate)
Select all slaves.
|
Long |
unlink(K... keys)
Unlink one or more keys with pipelining.
|
asking, auth, close, clusterAddSlots, 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
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, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, rename, renamenx, restore, scan, scan, scan, scan, scan, scan, scan, scan, sort, sort, sort, sort, sortStore, ttl, type
append, bitcount, bitcount, 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, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smove, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstore
zadd, zadd, zadd, zadd, 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
digest, eval, eval, evalsha, evalsha, scriptExists, scriptLoad
pfadd, pfcount, pfmerge
geoadd, geoadd, geodist, geopos, georadius, georadius, georadiusbymember, georadiusbymember
echo, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, waitForReplication
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, exists, expire, expireat, expireat, migrate, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, rename, renamenx, restore, scan, scan, scan, scan, scan, scan, scan, scan, sort, sort, sort, sort, sortStore, ttl, type
append, bitcount, bitcount, 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, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smove, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstore
zadd, zadd, zadd, zadd, 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
debugCrashAndRecover, debugReload, debugRestart, debugSdslen
pfadd, pfcount, pfmerge
geoadd, geoadd, geodist, geopos, georadius, georadius, georadiusbymember, georadiusbymember
digest, discard, 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 nodesgetConnection
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(java.util.function.Predicate<RedisClusterNode> predicate)
predicate
- Predicate to filter nodesdefault NodeSelection<K,V> all()
NodeSelection<K,V> readonly(java.util.function.Predicate<RedisClusterNode> predicate)
NodeSelectionSupport
does not change when the cluster view changes.predicate
- Predicate to filter nodespredicate
NodeSelection<K,V> nodes(java.util.function.Predicate<RedisClusterNode> predicate)
NodeSelectionSupport
does
not change when the cluster view changes.predicate
- Predicate to filter nodespredicate
NodeSelection<K,V> nodes(java.util.function.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 keysLong unlink(K... keys)
unlink
in interface RedisKeyCommands<K,V>
unlink
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 keyString 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.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).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.String flushall()
flushall
in interface RedisServerCommands<K,V>
flushall
in interface RedisServerConnection<K,V>
String flushdb()
flushdb
in interface RedisServerCommands<K,V>
flushdb
in interface RedisServerConnection<K,V>
Long dbsize()
dbsize
in interface RedisServerCommands<K,V>
dbsize
in interface RedisServerConnection<K,V>
List<K> keys(K pattern)
keys
in interface RedisKeyCommands<K,V>
keys
in interface RedisKeysConnection<K,V>
pattern
- the pattern type: patternkey (pattern)pattern
.Long keys(KeyStreamingChannel<K> channel, K pattern)
keys
in interface RedisKeyCommands<K,V>
keys
in interface RedisKeysConnection<K,V>
channel
- the channelpattern
- the patternpattern
.V randomkey()
randomkey
in interface RedisKeyCommands<K,V>
randomkey
in interface RedisKeysConnection<K,V>
String scriptFlush()
scriptFlush
in interface RedisScriptingCommands<K,V>
scriptFlush
in interface RedisScriptingConnection<K,V>
String scriptKill()
scriptKill
in interface RedisScriptingCommands<K,V>
scriptKill
in interface RedisScriptingConnection<K,V>
void shutdown(boolean save)
shutdown
in interface RedisServerCommands<K,V>
shutdown
in interface RedisServerConnection<K,V>
save
- true force save operationCopyright © 2016. All rights reserved.