K - Key type.V - Value type.public interface RedisClusterReactiveCommands<K,V> extends RedisHashReactiveCommands<K,V>, RedisKeyReactiveCommands<K,V>, RedisStringReactiveCommands<K,V>, RedisListReactiveCommands<K,V>, RedisSetReactiveCommands<K,V>, RedisSortedSetReactiveCommands<K,V>, RedisScriptingReactiveCommands<K,V>, RedisServerReactiveCommands<K,V>, RedisHLLReactiveCommands<K,V>, RedisGeoReactiveCommands<K,V>, BaseRedisReactiveCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<String> |
asking()
The asking command is required after a
-ASK redirection. |
rx.Observable<String> |
auth(String password)
Authenticate to the server.
|
rx.Observable<String> |
clusterAddSlots(int... slots)
Adds slots to the cluster node.
|
rx.Observable<String> |
clusterBumpepoch()
Generate a new config epoch, incrementing the current epoch, assign the new epoch to this node, WITHOUT any consensus and
persist the configuration on disk before sending packets with the new configuration.
|
rx.Observable<Long> |
clusterCountFailureReports(String nodeId)
Returns the number of failure reports for the specified node.
|
rx.Observable<Long> |
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hash
slot. |
rx.Observable<String> |
clusterDelSlots(int... slots)
Removes slots from the cluster node.
|
rx.Observable<String> |
clusterFailover(boolean force)
Failover a cluster node.
|
rx.Observable<String> |
clusterFlushslots()
Delete all the slots associated with the specified node.
|
rx.Observable<String> |
clusterForget(String nodeId)
Blacklist and remove the cluster node from the cluster.
|
rx.Observable<K> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot. |
rx.Observable<String> |
clusterInfo()
Get information and statistics about the cluster viewed by the current node.
|
rx.Observable<Long> |
clusterKeyslot(K key)
Returns an integer identifying the hash slot the specified key hashes to.
|
rx.Observable<String> |
clusterMeet(String ip,
int port)
Meet another cluster node to include the node into the cluster.
|
rx.Observable<String> |
clusterMyId()
Obtain the nodeId for the currently connected node.
|
rx.Observable<String> |
clusterNodes()
Obtain details about all cluster nodes.
|
rx.Observable<String> |
clusterReplicate(String nodeId)
Turn this node into a slave of the node with the id
nodeId. |
rx.Observable<String> |
clusterReset(boolean hard)
Reset a node performing a soft or hard reset:
All other nodes are forgotten
All the assigned / open slots are released
If the node is a slave, it turns into a master
Only for hard reset: a new Node ID is generated
Only for hard reset: currentEpoch and configEpoch are set to 0
The new configuration is saved and the cluster state updated
If the node was a slave, the whole data set is flushed away
|
rx.Observable<String> |
clusterSaveconfig()
Forces a node to save the nodes.conf configuration on disk.
|
rx.Observable<String> |
clusterSetConfigEpoch(long configEpoch)
This command sets a specific config epoch in a fresh node.
|
rx.Observable<String> |
clusterSetSlotImporting(int slot,
String nodeId)
Flag a slot as IMPORTING (incoming) from the node specified in
nodeId. |
rx.Observable<String> |
clusterSetSlotMigrating(int slot,
String nodeId)
Flag a slot as MIGRATING (outgoing) towards the node specified in
nodeId. |
rx.Observable<String> |
clusterSetSlotNode(int slot,
String nodeId)
Assign a slot to a node.
|
rx.Observable<String> |
clusterSetSlotStable(int slot)
Clears migrating / importing state from the slot.
|
rx.Observable<String> |
clusterSlaves(String nodeId)
List slaves for a certain node identified by its
nodeId. |
rx.Observable<Object> |
clusterSlots()
Get array of cluster slots to node mappings.
|
rx.Observable<Long> |
del(K... keys)
Delete a key with pipelining.
|
rx.Observable<V> |
mget(K... keys)
Get the values of all the given keys with pipelining.
|
rx.Observable<String> |
mset(Map<K,V> map)
Set multiple keys to multiple values with pipelining.
|
rx.Observable<Boolean> |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist with pipelining.
|
rx.Observable<String> |
readOnly()
Tells a Redis cluster slave node that the client is ok reading possibly stale data and is not interested in running write
queries.
|
rx.Observable<String> |
readWrite()
Resets readOnly flag.
|
void |
setTimeout(long timeout,
TimeUnit unit)
Set the default timeout for operations.
|
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, hvalsdump, exists, expire, expireat, expireat, keys, keys, migrate, migrate, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, randomkey, rename, renamenx, restore, scan, scan, scan, scan, scan, scan, scan, scan, sort, sort, sort, sort, sortStore, touch, ttl, type, unlinkappend, 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, strlenblpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx, rpushxsadd, 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, sunionstorezadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zincrby, zinterstore, zinterstore, zlexcount, zlexcount, 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, zunionstoredigest, eval, eval, evalsha, evalsha, scriptExists, scriptFlush, scriptKill, scriptLoadbgrewriteaof, bgsave, clientGetname, clientKill, clientKill, clientList, clientPause, clientSetname, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, dbsize, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushall, flushallAsync, flushdb, flushdbAsync, info, info, lastsave, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, sync, timepfadd, pfcount, pfmergegeoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymemberclose, dispatch, dispatch, echo, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, waitForReplicationvoid setTimeout(long timeout,
TimeUnit unit)
timeout - the timeout valueunit - the unit of the timeout valuerx.Observable<String> auth(String password)
password - the passwordrx.Observable<String> clusterBumpepoch()
rx.Observable<String> clusterMeet(String ip, int port)
ip - IP address of the hostport - port number.rx.Observable<String> clusterForget(String nodeId)
nodeId - the node Idrx.Observable<String> clusterAddSlots(int... slots)
slots - one or more slots from 0 to 16384rx.Observable<String> clusterDelSlots(int... slots)
slots - one or more slots from 0 to 16384rx.Observable<String> clusterSetSlotNode(int slot, String nodeId)
nodeIdslot - the slotnodeId - the id of the node that will become the master for the slotrx.Observable<String> clusterSetSlotStable(int slot)
slot - the slotrx.Observable<String> clusterSetSlotMigrating(int slot, String nodeId)
nodeId. The slot must be handled by
the current node in order to be migrated.slot - the slotnodeId - the id of the node is targeted to become the master for the slotrx.Observable<String> clusterSetSlotImporting(int slot, String nodeId)
nodeId.slot - the slotnodeId - the id of the node is the master of the slotrx.Observable<String> clusterInfo()
rx.Observable<String> clusterMyId()
rx.Observable<String> clusterNodes()
ClusterPartitionParser.parse(java.lang.String)rx.Observable<String> clusterSlaves(String nodeId)
nodeId. Can be parsed using
ClusterPartitionParser.parse(java.lang.String)nodeId - node id of the master nodeclusterNodes() but one line per slave.rx.Observable<K> clusterGetKeysInSlot(int slot, int count)
slot.slot - the slotcount - maximal number of keysrx.Observable<Long> clusterCountKeysInSlot(int slot)
slot.slot - the slotrx.Observable<Long> clusterCountFailureReports(String nodeId)
nodeId - the node idrx.Observable<Long> clusterKeyslot(K key)
SlotHash.getSlot(byte[]). If not, call Houston and report that we've got a problem.key - the key.rx.Observable<String> clusterSaveconfig()
OK or an error if the operation fails.rx.Observable<String> clusterSetConfigEpoch(long configEpoch)
configEpoch - the config epochOK or an error if the operation fails.rx.Observable<Object> clusterSlots()
rx.Observable<String> asking()
-ASK redirection. The client should issue ASKING before to
actually send the command to the target instance. See the Redis Cluster specification for more information.rx.Observable<String> clusterReplicate(String nodeId)
nodeId.nodeId - master node idrx.Observable<String> clusterFailover(boolean force)
force - do not coordinate with master if truerx.Observable<String> clusterReset(boolean hard)
hard - true for hard reset. Generates a new nodeId and currentEpoch/configEpoch are set to 0rx.Observable<String> clusterFlushslots()
rx.Observable<String> readOnly()
readOnly in interface BaseRedisReactiveCommands<K,V>rx.Observable<String> readWrite()
readWrite in interface BaseRedisReactiveCommands<K,V>rx.Observable<Long> del(K... keys)
del in interface RedisKeyReactiveCommands<K,V>keys - the keyrx.Observable<V> mget(K... keys)
mget in interface RedisStringReactiveCommands<K,V>keys - the keyrx.Observable<String> mset(Map<K,V> map)
mset in interface RedisStringReactiveCommands<K,V>map - the nullOK since MSET can't fail.rx.Observable<Boolean> msetnx(Map<K,V> map)
msetnx in interface RedisStringReactiveCommands<K,V>map - the null1 if the all the keys were set. 0 if no key was set (at least one key already existed).Copyright © 2017 lettuce.io. All rights reserved.