@ChannelHandler.Sharable public class RedisAdvancedClusterAsyncConnectionImpl<K,V> extends RedisAsyncConnectionImpl<K,V> implements RedisAdvancedClusterAsyncConnection<K,V>
ChannelHandler.Sharablecodec, commandBuilder, multitimeout, unit| Constructor and Description |
|---|
RedisAdvancedClusterAsyncConnectionImpl(RedisChannelWriter<K,V> writer,
RedisCodec<K,V> codec,
long timeout,
TimeUnit unit)
Initialize a new connection.
|
| Modifier and Type | Method and Description |
|---|---|
RedisFuture<Long> |
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hash
slot. |
RedisFuture<List<K>> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot. |
RedisClusterAsyncConnection<K,V> |
getConnection(String nodeId)
Retrieve a connection to the specified cluster node using the nodeId.
|
RedisClusterAsyncConnection<K,V> |
getConnection(String host,
int port)
Retrieve a connection to the specified cluster node using the nodeId.
|
ReadFrom |
getReadFrom()
Gets the
ReadFrom setting for this connection. |
void |
setPartitions(Partitions partitions) |
void |
setReadFrom(ReadFrom readFrom)
Set from which nodes data is read.
|
activated, append, asking, auth, bgrewriteaof, bgsave, bitcount, bitcount, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, blpop, brpop, brpoplpush, clientGetname, clientKill, clientKill, clientList, clientPause, clientSetname, clusterAddSlots, clusterCountFailureReports, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, dbsize, debugHtstats, debugObject, debugOom, debugSegfault, decr, decrby, del, digest, discard, dispatch, dispatch, dispatch, dump, echo, eval, eval, evalsha, evalsha, exec, exists, exists, expire, expireat, expireat, flushall, flushallAsync, flushdb, flushdbAsync, geoadd, geoadd, geodist, geopos, georadius, georadius, georadiusbymember, georadiusbymember, get, getbit, getrange, getset, 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, incr, incrby, incrbyfloat, info, info, isMulti, keys, keys, lastsave, lindex, linsert, llen, lpop, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, mget, mget, migrate, move, mset, msetnx, multi, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pfadd, pfcount, pfmerge, ping, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, randomkey, readOnly, readWrite, rename, renamenx, restore, role, rpop, rpoplpush, rpush, rpushx, sadd, save, scan, scan, scan, scan, scan, scan, scan, scan, scard, scriptExists, scriptFlush, scriptKill, scriptLoad, sdiff, sdiff, sdiffstore, select, set, set, setbit, setex, setnx, setrange, shutdown, shutdown, sinter, sinter, sinterstore, sismember, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, smembers, smembers, smove, sort, sort, sort, sort, sortStore, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, string, strlen, sunion, sunion, sunionstore, sync, time, ttl, type, unlink, unwatch, waitForReplication, watch, 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, zunionstoreaddListener, channelRead, channelRead, channelRegistered, close, deactivated, flushCommands, getChannelWriter, getOptions, getTimeout, getTimeoutUnit, isClosed, isOpen, registerCloseables, reset, setAutoFlushCommands, setOptions, setTimeoutchannelActive, channelInactive, channelReadComplete, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredhandlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasking, close, clusterAddSlots, clusterCountFailureReports, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, readOnly, readWritehdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hsetnx, hstrlen, hvals, hvalsdel, dump, exists, exists, expire, expireat, expireat, keys, keys, 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, ttl, type, unlinkappend, bitcount, bitcount, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, decr, decrby, get, getbit, getrange, getset, incr, incrby, incrbyfloat, mget, mget, mset, msetnx, psetex, set, set, setbit, setex, setnx, setrange, strlenblpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushxsadd, 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, sunionstorezadd, 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, zunionstoreeval, eval, evalsha, evalsha, scriptExists, scriptFlush, scriptKill, scriptLoadbgrewriteaof, bgsave, clientGetname, clientKill, clientKill, clientList, clientPause, clientSetname, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, dbsize, debugHtstats, debugObject, debugOom, debugSegfault, flushall, flushallAsync, flushdb, flushdbAsync, info, info, lastsave, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, sync, timepfadd, pfcount, pfmergegeoadd, geoadd, geodist, geopos, georadius, georadius, georadiusbymember, georadiusbymemberdigest, discard, echo, exec, flushCommands, isOpen, multi, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, role, setAutoFlushCommands, unwatch, waitForReplication, watchsetTimeouthandlerAdded, handlerRemovedpublic RedisAdvancedClusterAsyncConnectionImpl(RedisChannelWriter<K,V> writer, RedisCodec<K,V> codec, long timeout, TimeUnit unit)
writer - the channel writercodec - Codec used to encode/decode keys and values.timeout - Maximum time to wait for a response.unit - Unit of time for the timeout.public RedisClusterAsyncConnection<K,V> getConnection(String nodeId)
RedisAdvancedClusterAsyncConnectionnodeId, that behavior can also lead to a closed connection once the node with the
specified nodeId is no longer part of the cluster.
Do not close the connections. Otherwise, unpredictable behavior will occur. The nodeId must be part of the cluster and is
validated against the current topology view in Partitions.
In contrast to the RedisAdvancedClusterAsyncConnection, node-connections do not route commands to other cluster
nodes.getConnection in interface RedisAdvancedClusterAsyncConnection<K,V>nodeId - the node Idpublic RedisFuture<List<K>> clusterGetKeysInSlot(int slot, int count)
RedisClusterAsyncConnectionslot.clusterGetKeysInSlot in interface RedisClusterAsyncConnection<K,V>clusterGetKeysInSlot in class RedisAsyncConnectionImpl<K,V>slot - the slotcount - maximal number of keyspublic RedisFuture<Long> clusterCountKeysInSlot(int slot)
RedisClusterAsyncConnectionslot.clusterCountKeysInSlot in interface RedisClusterAsyncConnection<K,V>clusterCountKeysInSlot in class RedisAsyncConnectionImpl<K,V>slot - the slotpublic RedisClusterAsyncConnection<K,V> getConnection(String host, int port)
RedisAdvancedClusterAsyncConnectionhost and port,
are no longer part of the cluster.
Do not close the connections. Otherwise, unpredictable behavior will occur. The node must be part of the cluster and
host/port are validated (exact check) against the current topology view in
Partitions.
In contrast to the RedisAdvancedClusterAsyncConnection, node-connections do not route commands to other cluster
nodes.getConnection in interface RedisAdvancedClusterAsyncConnection<K,V>host - the hostport - the portpublic void setPartitions(Partitions partitions)
public void setReadFrom(ReadFrom readFrom)
RedisAdvancedClusterAsyncConnectionReadFrom for more information.setReadFrom in interface RedisAdvancedClusterAsyncConnection<K,V>readFrom - the read from setting, must not be nullpublic ReadFrom getReadFrom()
RedisAdvancedClusterAsyncConnectionReadFrom setting for this connection. Defaults to ReadFrom.MASTER if not set.getReadFrom in interface RedisAdvancedClusterAsyncConnection<K,V>Copyright © 2016. All rights reserved.