K - Key type.V - Value type.public interface RedisClusterAsyncCommands<K,V> extends BaseRedisAsyncCommands<K,V>, RedisGeoAsyncCommands<K,V>, RedisHashAsyncCommands<K,V>, RedisHLLAsyncCommands<K,V>, RedisKeyAsyncCommands<K,V>, RedisListAsyncCommands<K,V>, RedisScriptingAsyncCommands<K,V>, RedisServerAsyncCommands<K,V>, RedisSetAsyncCommands<K,V>, RedisSortedSetAsyncCommands<K,V>, RedisStreamAsyncCommands<K,V>, RedisStringAsyncCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
RedisFuture<String> |
asking()
The asking command is required after a
-ASK redirection. |
String |
auth(String password)
Authenticate to the server.
|
RedisFuture<String> |
clusterAddSlots(int... slots)
Adds slots to the cluster node.
|
RedisFuture<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.
|
RedisFuture<Long> |
clusterCountFailureReports(String nodeId)
Returns the number of failure reports for the specified node.
|
RedisFuture<Long> |
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hash
slot. |
RedisFuture<String> |
clusterDelSlots(int... slots)
Removes slots from the cluster node.
|
RedisFuture<String> |
clusterFailover(boolean force)
Failover a cluster node.
|
RedisFuture<String> |
clusterFlushslots()
Delete all the slots associated with the specified node.
|
RedisFuture<String> |
clusterForget(String nodeId)
Blacklist and remove the cluster node from the cluster.
|
RedisFuture<List<K>> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot. |
RedisFuture<String> |
clusterInfo()
Get information and statistics about the cluster viewed by the current node.
|
RedisFuture<Long> |
clusterKeyslot(K key)
Returns an integer identifying the hash slot the specified key hashes to.
|
RedisFuture<String> |
clusterMeet(String ip,
int port)
Meet another cluster node to include the node into the cluster.
|
RedisFuture<String> |
clusterMyId()
Obtain the nodeId for the currently connected node.
|
RedisFuture<String> |
clusterNodes()
Obtain details about all cluster nodes.
|
RedisFuture<String> |
clusterReplicate(String nodeId)
Turn this node into a replica of the node with the id
nodeId. |
RedisFuture<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 replica, 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 replica, the whole data set is flushed away
|
RedisFuture<String> |
clusterSaveconfig()
Forces a node to save the nodes.conf configuration on disk.
|
RedisFuture<String> |
clusterSetConfigEpoch(long configEpoch)
This command sets a specific config epoch in a fresh node.
|
RedisFuture<String> |
clusterSetSlotImporting(int slot,
String nodeId)
Flag a slot as IMPORTING (incoming) from the node specified in
nodeId. |
RedisFuture<String> |
clusterSetSlotMigrating(int slot,
String nodeId)
Flag a slot as MIGRATING (outgoing) towards the node specified in
nodeId. |
RedisFuture<String> |
clusterSetSlotNode(int slot,
String nodeId)
Assign a slot to a node.
|
RedisFuture<String> |
clusterSetSlotStable(int slot)
Clears migrating / importing state from the slot.
|
RedisFuture<List<String>> |
clusterSlaves(String nodeId)
List replicas for a certain node identified by its
nodeId. |
RedisFuture<List<Object>> |
clusterSlots()
Get array of cluster slots to node mappings.
|
RedisFuture<Long> |
del(K... keys)
Delete a key with pipelining.
|
RedisFuture<List<KeyValue<K,V>>> |
mget(K... keys)
Get the values of all the given keys with pipelining.
|
RedisFuture<String> |
mset(Map<K,V> map)
Set multiple keys to multiple values with pipelining.
|
RedisFuture<Boolean> |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist with pipelining.
|
RedisFuture<String> |
readOnly()
Tells a Redis cluster replica node that the client is ok reading possibly stale data and is not interested in running
write queries.
|
RedisFuture<String> |
readWrite()
Resets readOnly flag.
|
void |
setTimeout(Duration timeout)
Set the default timeout for operations.
|
void |
setTimeout(long timeout,
TimeUnit unit)
Deprecated.
since 5.0, use
setTimeout(Duration). |
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplicationgeoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymemberhdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvalspfadd, pfcount, pfmergedump, exists, expire, expireat, expireat, keys, keys, migrate, migrate, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, randomkey, rename, renamenx, restore, restore, scan, scan, scan, scan, scan, scan, scan, scan, sort, sort, sort, sort, sortStore, touch, ttl, type, unlinkblpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushxdigest, eval, eval, evalsha, evalsha, scriptExists, scriptFlush, scriptKill, scriptLoadbgrewriteaof, bgsave, clientGetname, clientId, clientKill, clientKill, clientList, clientPause, clientSetname, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, dbsize, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushall, flushallAsync, flushdb, flushdbAsync, info, info, lastsave, memoryUsage, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, timesadd, 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, sunionstorebzpopmax, 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, zunionstorexack, xadd, xadd, xadd, xadd, xclaim, xclaim, xdel, xgroupCreate, xgroupCreate, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrimappend, 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, stralgoLcs, strlenvoid setTimeout(Duration timeout)
timeout - the timeout value.@Deprecated void setTimeout(long timeout, TimeUnit unit)
setTimeout(Duration).timeout - the timeout value.unit - the unit of the timeout value.String auth(String password)
password - the password.RedisFuture<String> clusterBumpepoch()
RedisFuture<String> clusterMeet(String ip, int port)
ip - IP address of the host.port - port number.RedisFuture<String> clusterForget(String nodeId)
nodeId - the node Id.RedisFuture<String> clusterAddSlots(int... slots)
slots - one or more slots from 0 to 16384.RedisFuture<String> clusterDelSlots(int... slots)
slots - one or more slots from 0 to 16384.RedisFuture<String> clusterSetSlotNode(int slot, String nodeId)
nodeIdslot - the slot.nodeId - the id of the node that will become the master for the slot.RedisFuture<String> clusterSetSlotStable(int slot)
slot - the slot.RedisFuture<String> clusterSetSlotMigrating(int slot, String nodeId)
nodeId. The slot must be handled by
the current node in order to be migrated.slot - the slot.nodeId - the id of the node is targeted to become the master for the slot.RedisFuture<String> clusterSetSlotImporting(int slot, String nodeId)
nodeId.slot - the slot.nodeId - the id of the node is the master of the slot.RedisFuture<String> clusterInfo()
RedisFuture<String> clusterMyId()
RedisFuture<String> clusterNodes()
ClusterPartitionParser.parse(java.lang.String)RedisFuture<List<String>> clusterSlaves(String nodeId)
nodeId. Can be parsed using
ClusterPartitionParser.parse(java.lang.String)nodeId - node id of the master node.clusterNodes() but one line per replica.RedisFuture<List<K>> clusterGetKeysInSlot(int slot, int count)
slot.slot - the slot.count - maximal number of keys.RedisFuture<Long> clusterCountKeysInSlot(int slot)
slot.slot - the slot.RedisFuture<Long> clusterCountFailureReports(String nodeId)
nodeId - the node id.RedisFuture<Long> clusterKeyslot(K key)
SlotHash.getSlot(byte[]). If not, call Houston and report that we've got a problem.key - the key.RedisFuture<String> clusterSaveconfig()
OK or an error if the operation fails.RedisFuture<String> clusterSetConfigEpoch(long configEpoch)
configEpoch - the config epoch.OK or an error if the operation fails.RedisFuture<List<Object>> clusterSlots()
RedisFuture<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.RedisFuture<String> clusterReplicate(String nodeId)
nodeId.nodeId - master node id.RedisFuture<String> clusterFailover(boolean force)
force - do not coordinate with master if true.RedisFuture<String> clusterReset(boolean hard)
hard - true for hard reset. Generates a new nodeId and currentEpoch/configEpoch are set to 0.RedisFuture<String> clusterFlushslots()
RedisFuture<String> readOnly()
readOnly in interface BaseRedisAsyncCommands<K,V>RedisFuture<String> readWrite()
readWrite in interface BaseRedisAsyncCommands<K,V>RedisFuture<Long> del(K... keys)
del in interface RedisKeyAsyncCommands<K,V>keys - the key.RedisFuture<List<KeyValue<K,V>>> mget(K... keys)
mget in interface RedisStringAsyncCommands<K,V>keys - the key.RedisFuture<String> mset(Map<K,V> map)
mset in interface RedisStringAsyncCommands<K,V>map - the null.OK since MSET can't fail.RedisFuture<Boolean> msetnx(Map<K,V> map)
msetnx in interface RedisStringAsyncCommands<K,V>map - the null.1 if the all the keys were set. 0 if no key was set (at least one key already existed).Copyright © 2020 lettuce.io. All rights reserved.