Module lettuce.core
Package io.lettuce.core.cluster
Class RedisAdvancedClusterAsyncCommandsImpl<K,V>
java.lang.Object
io.lettuce.core.AbstractRedisAsyncCommands<K,V>
io.lettuce.core.cluster.RedisAdvancedClusterAsyncCommandsImpl<K,V>
- Type Parameters:
K- Key type.V- Value type.
- All Implemented Interfaces:
BaseRedisAsyncCommands<K,V>,RedisAclAsyncCommands<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>,RedisTransactionalAsyncCommands<K,V>,RedisAdvancedClusterAsyncCommands<K,V>,RedisClusterAsyncCommands<K,V>
public class RedisAdvancedClusterAsyncCommandsImpl<K,V> extends AbstractRedisAsyncCommands<K,V> implements RedisAdvancedClusterAsyncCommands<K,V>
An advanced asynchronous and thread-safe API for a Redis Cluster connection.
- Since:
- 3.3
- Author:
- Mark Paluch, Jon Chambers
-
Constructor Summary
Constructors Constructor Description RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)Initialize a new connection.RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)Deprecated. -
Method Summary
Modifier and Type Method Description RedisFuture<String>clientSetname(K name)Set the current connection name.RedisFuture<Long>clusterCountKeysInSlot(int slot)Returns the number of keys in the specified Redis Cluster hashslot.RedisFuture<List<K>>clusterGetKeysInSlot(int slot, int count)Retrieve the list of keys within theslot.RedisFuture<Long>dbsize()Return the number of keys in the selected database.RedisFuture<Long>del(Iterable<K> keys)RedisFuture<Long>del(K... keys)Delete one or more keys.protected <T> Map<String,CompletableFuture<T>>executeOnNodes(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function, Function<RedisClusterNode,Boolean> filter)Run a command on all available nodes that matchfilter.protected <T> Map<String,CompletableFuture<T>>executeOnUpstream(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)Run a command on all available masters,RedisFuture<Long>exists(Iterable<K> keys)RedisFuture<Long>exists(K... keys)Determine how many keys exist.RedisFuture<String>flushall()Remove all keys from all databases.RedisFuture<String>flushallAsync()Remove all keys asynchronously from all databases.RedisFuture<String>flushdb()Remove all keys from the current database.RedisFuture<Set<V>>georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)Retrieve members selected by distance with the center oflongitudeandlatitude.RedisFuture<List<GeoWithin<V>>>georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Retrieve members selected by distance with the center oflongitudeandlatitude.RedisFuture<Set<V>>georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)Retrieve members selected by distance with the center ofmember.RedisFuture<List<GeoWithin<V>>>georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Retrieve members selected by distance with the center ofmember.RedisClusterAsyncCommands<K,V>getConnection(String nodeId)Retrieve a connection to the specified cluster node using the nodeId.RedisClusterAsyncCommands<K,V>getConnection(String host, int port)Retrieve a connection to the specified cluster node using host and port.StatefulRedisClusterConnection<K,V>getStatefulConnection()RedisFuture<Long>keys(KeyStreamingChannel<K> channel, K pattern)Find all keys matching the given pattern.RedisFuture<List<K>>keys(K pattern)Find all keys matching the given pattern.RedisFuture<Long>mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)RedisFuture<Long>mget(KeyValueStreamingChannel<K,V> channel, K... keys)Stream over the values of all the given keys.RedisFuture<List<KeyValue<K,V>>>mget(Iterable<K> keys)RedisFuture<List<KeyValue<K,V>>>mget(K... keys)Get the values of all the given keys.RedisFuture<String>mset(Map<K,V> map)Set multiple keys to multiple values.RedisFuture<Boolean>msetnx(Map<K,V> map)Set multiple keys to multiple values, only if none of the keys exist.AsyncNodeSelection<K,V>nodes(Predicate<RedisClusterNode> predicate)Select nodes by a predicate and keeps a static selection.AsyncNodeSelection<K,V>nodes(Predicate<RedisClusterNode> predicate, boolean dynamic)Select nodes by a predicateprotected AsyncNodeSelection<K,V>nodes(Predicate<RedisClusterNode> predicate, io.lettuce.core.cluster.ClusterConnectionProvider.Intent intent, boolean dynamic)RedisFuture<K>randomkey()Return a random key from the keyspace.AsyncNodeSelection<K,V>readonly(Predicate<RedisClusterNode> predicate)Select replica nodes by a predicate and keeps a static selection.RedisFuture<KeyScanCursor<K>>scan()Incrementally iterate the keys space.RedisFuture<StreamScanCursor>scan(KeyStreamingChannel<K> channel)Incrementally iterate the keys space.RedisFuture<StreamScanCursor>scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)Incrementally iterate the keys space.RedisFuture<StreamScanCursor>scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)Incrementally iterate the keys space.RedisFuture<StreamScanCursor>scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)Incrementally iterate the keys space.RedisFuture<KeyScanCursor<K>>scan(ScanArgs scanArgs)Incrementally iterate the keys space.RedisFuture<KeyScanCursor<K>>scan(ScanCursor scanCursor)Incrementally iterate the keys space.RedisFuture<KeyScanCursor<K>>scan(ScanCursor scanCursor, ScanArgs scanArgs)Incrementally iterate the keys space.RedisFuture<String>scriptFlush()Remove all the scripts from the script cache.RedisFuture<String>scriptKill()Kill the script currently in execution.RedisFuture<String>scriptLoad(byte[] script)Load the specified Lua script into the script cache.voidshutdown(boolean save)Synchronously save the dataset to disk and then shut down the server.RedisFuture<Long>touch(Iterable<K> keys)RedisFuture<Long>touch(K... keys)Touch one or more keys.RedisFuture<Long>unlink(Iterable<K> keys)RedisFuture<Long>unlink(K... keys)Unlink one or more keys (non blocking DEL).Methods inherited from class io.lettuce.core.AbstractRedisAsyncCommands
aclCat, aclCat, aclDeluser, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami, append, asking, auth, auth, auth, auth, bgrewriteaof, bgsave, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, blmove, blpop, brpop, brpoplpush, bzpopmax, bzpopmin, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientPause, clientTracking, clientUnblock, clusterAddSlots, clusterBumpepoch, 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, copy, copy, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, digest, digest, discard, dispatch, dispatch, dispatch, dispatch, dispatch, dump, echo, eval, eval, eval, eval, evalsha, evalsha, exec, expire, expire, expireat, expireat, expireat, flushall, flushCommands, flushdb, flushdbAsync, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadius_ro, georadius_ro, georadiusbymember, georadiusbymember_ro, georadiusbymember_ro, geosearch, geosearch, geosearchstore, get, getbit, getConnection, getdel, getex, getrange, getset, hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvals, incr, incrby, incrbyfloat, info, info, isOpen, lastsave, lindex, linsert, llen, lmove, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, memoryUsage, migrate, migrate, move, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pfadd, pfcount, pfmerge, ping, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, readOnly, readWrite, rename, renamenx, reset, restore, restore, role, rpop, rpop, rpoplpush, rpush, rpushx, sadd, save, scard, scriptExists, scriptFlush, scriptLoad, sdiff, sdiff, sdiffstore, select, set, set, setAutoFlushCommands, setbit, setex, setGet, setGet, setnx, setrange, setTimeout, sinter, sinter, sinterstore, sismember, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, smembers, smembers, smismember, smove, sort, sort, sort, sort, sortStore, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, stralgoLcs, strlen, sunion, sunion, sunionstore, swapdb, time, ttl, type, unwatch, waitForReplication, watch, xack, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrim, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, 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, zrangestorebylex, zrangestorebyscore, 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, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScoresMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.lettuce.core.api.async.BaseRedisAsyncCommands
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplicationMethods inherited from interface io.lettuce.core.api.async.RedisAclAsyncCommands
aclCat, aclCat, aclDeluser, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoamiMethods inherited from interface io.lettuce.core.cluster.api.async.RedisAdvancedClusterAsyncCommands
all, masters, replicas, replicas, scriptLoad, slaves, slaves, upstreamMethods inherited from interface io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands
asking, auth, auth, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, readOnly, readWrite, setTimeoutMethods inherited from interface io.lettuce.core.api.async.RedisGeoAsyncCommands
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadiusbymember, geosearch, geosearch, geosearchstoreMethods inherited from interface io.lettuce.core.api.async.RedisHashAsyncCommands
hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvalsMethods inherited from interface io.lettuce.core.api.async.RedisHLLAsyncCommands
pfadd, pfcount, pfmergeMethods inherited from interface io.lettuce.core.api.async.RedisKeyAsyncCommands
copy, copy, dump, expire, expire, expireat, expireat, expireat, migrate, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pttl, rename, renamenx, restore, restore, sort, sort, sort, sort, sortStore, ttl, typeMethods inherited from interface io.lettuce.core.api.async.RedisListAsyncCommands
blmove, blpop, brpop, brpoplpush, lindex, linsert, llen, lmove, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpop, rpoplpush, rpush, rpushxMethods inherited from interface io.lettuce.core.api.async.RedisScriptingAsyncCommands
digest, digest, eval, eval, eval, eval, evalsha, evalsha, scriptExists, scriptFlushMethods inherited from interface io.lettuce.core.api.async.RedisServerAsyncCommands
bgrewriteaof, bgsave, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientPause, clientTracking, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushall, flushdb, flushdbAsync, info, info, lastsave, memoryUsage, save, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, timeMethods inherited from interface io.lettuce.core.api.async.RedisSetAsyncCommands
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smismember, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstoreMethods inherited from interface io.lettuce.core.api.async.RedisSortedSetAsyncCommands
bzpopmax, bzpopmin, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, 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, zrangestorebylex, zrangestorebyscore, 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, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScoresMethods inherited from interface io.lettuce.core.api.async.RedisStreamAsyncCommands
xack, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrimMethods inherited from interface io.lettuce.core.api.async.RedisStringAsyncCommands
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getdel, getex, getrange, getset, incr, incrby, incrbyfloat, psetex, set, set, setbit, setex, setGet, setGet, setnx, setrange, stralgoLcs, strlen
-
Constructor Details
-
RedisAdvancedClusterAsyncCommandsImpl
@Deprecated public RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)Deprecated.Initialize a new connection.- Parameters:
connection- the stateful connectioncodec- Codec used to encode/decode keys and values.
-
RedisAdvancedClusterAsyncCommandsImpl
public RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection<K,V> connection, RedisCodec<K,V> codec)Initialize a new connection.- Parameters:
connection- the stateful connectioncodec- Codec used to encode/decode keys and values.
-
-
Method Details
-
clientSetname
Description copied from interface:RedisServerAsyncCommandsSet the current connection name.- Specified by:
clientSetnamein interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
clientSetnamein interfaceRedisServerAsyncCommands<K,V>- Overrides:
clientSetnamein classAbstractRedisAsyncCommands<K,V>- Parameters:
name- the client name.- Returns:
- simple-string-reply
OKif the connection name was successfully set. - See Also:
RedisServerAsyncCommands.clientSetname(Object)
-
clusterCountKeysInSlot
Description copied from interface:RedisClusterAsyncCommandsReturns the number of keys in the specified Redis Cluster hashslot.- Specified by:
clusterCountKeysInSlotin interfaceRedisClusterAsyncCommands<K,V>- Overrides:
clusterCountKeysInSlotin classAbstractRedisAsyncCommands<K,V>- Parameters:
slot- the slot- Returns:
- Integer reply: The number of keys in the specified hash slot, or an error if the hash slot is invalid.
-
clusterGetKeysInSlot
Description copied from interface:RedisClusterAsyncCommandsRetrieve the list of keys within theslot.- Specified by:
clusterGetKeysInSlotin interfaceRedisClusterAsyncCommands<K,V>- Overrides:
clusterGetKeysInSlotin classAbstractRedisAsyncCommands<K,V>- Parameters:
slot- the slotcount- maximal number of keys- Returns:
- List<K> array-reply list of keys
-
dbsize
Description copied from interface:RedisServerAsyncCommandsReturn the number of keys in the selected database.- Specified by:
dbsizein interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
dbsizein interfaceRedisServerAsyncCommands<K,V>- Overrides:
dbsizein classAbstractRedisAsyncCommands<K,V>- Returns:
- Long integer-reply.
- See Also:
RedisServerAsyncCommands.dbsize()
-
del
Description copied from interface:RedisKeyAsyncCommandsDelete one or more keys.- Specified by:
delin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
delin interfaceRedisClusterAsyncCommands<K,V>- Specified by:
delin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
delin classAbstractRedisAsyncCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyAsyncCommands.del(Object[])
-
del
- Overrides:
delin classAbstractRedisAsyncCommands<K,V>
-
exists
Description copied from interface:RedisKeyAsyncCommandsDetermine how many keys exist.- Specified by:
existsin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
existsin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
existsin classAbstractRedisAsyncCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply specifically: Number of existing keys.
-
exists
- Overrides:
existsin classAbstractRedisAsyncCommands<K,V>
-
flushall
Description copied from interface:RedisServerAsyncCommandsRemove all keys from all databases.- Specified by:
flushallin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
flushallin interfaceRedisServerAsyncCommands<K,V>- Overrides:
flushallin classAbstractRedisAsyncCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisServerAsyncCommands.flushall()
-
flushallAsync
Description copied from interface:RedisServerAsyncCommandsRemove all keys asynchronously from all databases.- Specified by:
flushallAsyncin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
flushallAsyncin interfaceRedisServerAsyncCommands<K,V>- Overrides:
flushallAsyncin classAbstractRedisAsyncCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisServerAsyncCommands.flushallAsync()
-
flushdb
Description copied from interface:RedisServerAsyncCommandsRemove all keys from the current database.- Specified by:
flushdbin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
flushdbin interfaceRedisServerAsyncCommands<K,V>- Overrides:
flushdbin classAbstractRedisAsyncCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisServerAsyncCommands.flushdb()
-
georadius
public RedisFuture<Set<V>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center oflongitudeandlatitude.- Specified by:
georadiusin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.longitude- the longitude coordinate according to WGS84.latitude- the latitude coordinate according to WGS84.distance- radius distance.unit- distance unit.- Returns:
- bulk reply.
-
georadius
public RedisFuture<List<GeoWithin<V>>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center oflongitudeandlatitude.- Specified by:
georadiusin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.longitude- the longitude coordinate according to WGS84.latitude- the latitude coordinate according to WGS84.distance- radius distance.unit- distance unit.geoArgs- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithincontains only fields which were requested byGeoArgs.
-
georadiusbymember
Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center ofmember. The member itself is always contained in the results.- Specified by:
georadiusbymemberin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusbymemberin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.member- reference member.distance- radius distance.unit- distance unit.- Returns:
- set of members.
-
georadiusbymember
public RedisFuture<List<GeoWithin<V>>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center ofmember. The member itself is always contained in the results.- Specified by:
georadiusbymemberin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusbymemberin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.member- reference member.distance- radius distance.unit- distance unit.geoArgs- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithincontains only fields which were requested byGeoArgs.
-
keys
Description copied from interface:RedisKeyAsyncCommandsFind all keys matching the given pattern.- Specified by:
keysin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
keysin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
keysin classAbstractRedisAsyncCommands<K,V>- Parameters:
pattern- the pattern type: patternkey (pattern).- Returns:
- List<K> array-reply list of keys matching
pattern. - See Also:
RedisKeyAsyncCommands.keys(Object)
-
keys
Description copied from interface:RedisKeyAsyncCommandsFind all keys matching the given pattern.- Specified by:
keysin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
keysin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
keysin classAbstractRedisAsyncCommands<K,V>- Parameters:
channel- the channel.pattern- the pattern.- Returns:
- Long array-reply list of keys matching
pattern. - See Also:
RedisKeyAsyncCommands.keys(KeyStreamingChannel, Object)
-
mget
Description copied from interface:RedisStringAsyncCommandsGet the values of all the given keys.- Specified by:
mgetin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
mgetin interfaceRedisClusterAsyncCommands<K,V>- Specified by:
mgetin interfaceRedisStringAsyncCommands<K,V>- Overrides:
mgetin classAbstractRedisAsyncCommands<K,V>- Parameters:
keys- the key.- Returns:
- List<V> array-reply list of values at the specified keys.
- See Also:
RedisStringAsyncCommands.mget(Object[])
-
mget
- Overrides:
mgetin classAbstractRedisAsyncCommands<K,V>
-
mget
Description copied from interface:RedisStringAsyncCommandsStream over the values of all the given keys.- Specified by:
mgetin interfaceRedisStringAsyncCommands<K,V>- Overrides:
mgetin classAbstractRedisAsyncCommands<K,V>- Parameters:
channel- the channel.keys- the keys.- Returns:
- Long array-reply list of values at the specified keys.
-
mget
- Overrides:
mgetin classAbstractRedisAsyncCommands<K,V>
-
mset
Description copied from interface:RedisStringAsyncCommandsSet multiple keys to multiple values.- Specified by:
msetin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
msetin interfaceRedisClusterAsyncCommands<K,V>- Specified by:
msetin interfaceRedisStringAsyncCommands<K,V>- Overrides:
msetin classAbstractRedisAsyncCommands<K,V>- Parameters:
map- the null.- Returns:
- String simple-string-reply always
OKsinceMSETcan't fail. - See Also:
RedisStringAsyncCommands.mset(Map)
-
msetnx
Description copied from interface:RedisStringAsyncCommandsSet multiple keys to multiple values, only if none of the keys exist.- Specified by:
msetnxin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
msetnxin interfaceRedisClusterAsyncCommands<K,V>- Specified by:
msetnxin interfaceRedisStringAsyncCommands<K,V>- Overrides:
msetnxin classAbstractRedisAsyncCommands<K,V>- Parameters:
map- the null.- Returns:
- Boolean integer-reply specifically:
1if the all the keys were set.0if no key was set (at least one key already existed). - See Also:
RedisStringAsyncCommands.msetnx(Map)
-
randomkey
Description copied from interface:RedisKeyAsyncCommandsReturn a random key from the keyspace.- Specified by:
randomkeyin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
randomkeyin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
randomkeyin classAbstractRedisAsyncCommands<K,V>- Returns:
- K bulk-string-reply the random key, or
nullwhen the database is empty. - See Also:
RedisKeyAsyncCommands.randomkey()
-
scriptFlush
Description copied from interface:RedisScriptingAsyncCommandsRemove all the scripts from the script cache.- Specified by:
scriptFlushin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scriptFlushin interfaceRedisScriptingAsyncCommands<K,V>- Overrides:
scriptFlushin classAbstractRedisAsyncCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingAsyncCommands.scriptFlush()
-
scriptKill
Description copied from interface:RedisScriptingAsyncCommandsKill the script currently in execution.- Specified by:
scriptKillin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scriptKillin interfaceRedisScriptingAsyncCommands<K,V>- Overrides:
scriptKillin classAbstractRedisAsyncCommands<K,V>- Returns:
- String simple-string-reply.
- See Also:
RedisScriptingAsyncCommands.scriptKill()
-
scriptLoad
Description copied from interface:RedisScriptingAsyncCommandsLoad the specified Lua script into the script cache.- Specified by:
scriptLoadin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scriptLoadin interfaceRedisScriptingAsyncCommands<K,V>- Overrides:
scriptLoadin classAbstractRedisAsyncCommands<K,V>- Parameters:
script- script content.- Returns:
- String bulk-string-reply This command returns the SHA1 digest of the script added into the script cache.
-
shutdown
public void shutdown(boolean save)Description copied from interface:RedisServerAsyncCommandsSynchronously save the dataset to disk and then shut down the server.- Specified by:
shutdownin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
shutdownin interfaceRedisServerAsyncCommands<K,V>- Overrides:
shutdownin classAbstractRedisAsyncCommands<K,V>- Parameters:
save-trueforce save operation.- See Also:
RedisServerAsyncCommands.shutdown(boolean)
-
touch
Description copied from interface:RedisKeyAsyncCommandsTouch one or more keys. Touch sets the last accessed time for a key. Non-exsitent keys wont get created.- Specified by:
touchin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
touchin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
touchin classAbstractRedisAsyncCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply the number of found keys.
-
touch
- Overrides:
touchin classAbstractRedisAsyncCommands<K,V>
-
unlink
Description copied from interface:RedisKeyAsyncCommandsUnlink one or more keys (non blocking DEL).- Specified by:
unlinkin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
unlinkin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
unlinkin classAbstractRedisAsyncCommands<K,V>- Parameters:
keys- the keys.- Returns:
- Long integer-reply The number of keys that were removed.
- See Also:
RedisKeyAsyncCommands.unlink(Object[])
-
unlink
- Overrides:
unlinkin classAbstractRedisAsyncCommands<K,V>
-
getConnection
Description copied from interface:RedisAdvancedClusterAsyncCommandsRetrieve a connection to the specified cluster node using the nodeId. Host and port are looked up in the node list. In contrast to theRedisAdvancedClusterAsyncCommands, node-connections do not route commands to other cluster nodes- Specified by:
getConnectionin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Parameters:
nodeId- the node Id- Returns:
- a connection to the requested cluster node
-
getConnection
Description copied from interface:RedisAdvancedClusterAsyncCommandsRetrieve a connection to the specified cluster node using host and port. In contrast to theRedisAdvancedClusterAsyncCommands, node-connections do not route commands to other cluster nodes. Host and port connections are verified by default for cluster membership, seeClusterClientOptions.isValidateClusterNodeMembership().- Specified by:
getConnectionin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Parameters:
host- the hostport- the port- Returns:
- a connection to the requested cluster node
-
getStatefulConnection
- Specified by:
getStatefulConnectionin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Returns:
- the underlying connection.
-
nodes
Description copied from interface:RedisAdvancedClusterAsyncCommandsSelect nodes by a predicate and keeps a static selection. The set of nodes within theNodeSelectionSupportdoes not change when the cluster view changes.- Specified by:
nodesin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Parameters:
predicate- Predicate to filter nodes- Returns:
- API with asynchronous executed commands on a selection of cluster nodes matching
predicate
-
readonly
Description copied from interface:RedisAdvancedClusterAsyncCommandsSelect replica nodes by a predicate and keeps a static selection. Replica connections operate in READONLY mode. The set of nodes within theNodeSelectionSupportdoes not change when the cluster view changes.- Specified by:
readonlyin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Parameters:
predicate- Predicate to filter nodes- Returns:
- API with asynchronous executed commands on a selection of cluster nodes matching
predicate
-
nodes
Description copied from interface:RedisAdvancedClusterAsyncCommandsSelect nodes by a predicate- Specified by:
nodesin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Parameters:
predicate- Predicate to filter nodesdynamic- Defines, whether the set of nodes within theNodeSelectionSupportcan change when the cluster view changes.- Returns:
- API with asynchronous executed commands on a selection of cluster nodes matching
predicate
-
nodes
protected AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, io.lettuce.core.cluster.ClusterConnectionProvider.Intent intent, boolean dynamic) -
scan
Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
RedisKeyAsyncCommands.scan()
-
scan
Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Parameters:
scanArgs- scan arguments.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
KeyScanArgs
-
scan
Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Parameters:
scanCursor- cursor to resume from a previous scan, must not benull.scanArgs- scan arguments.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
KeyScanArgs
-
scan
Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Parameters:
scanCursor- cursor to resume from a previous scan, must not benull.- Returns:
- KeyScanCursor<K> scan cursor.
- See Also:
RedisKeyAsyncCommands.scan(ScanCursor)
-
scan
Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Parameters:
channel- streaming channel that receives a call for every key.- Returns:
- StreamScanCursor scan cursor.
- See Also:
RedisKeyAsyncCommands.scan(KeyStreamingChannel)
-
scan
Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Parameters:
channel- streaming channel that receives a call for every key.scanArgs- scan arguments.- Returns:
- StreamScanCursor scan cursor.
- See Also:
KeyScanArgs
-
scan
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space. UseKeyScanArgsto specifySCAN-specific arguments.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Parameters:
channel- streaming channel that receives a call for every key.scanCursor- cursor to resume from a previous scan, must not benull.scanArgs- scan arguments.- Returns:
- StreamScanCursor scan cursor.
- See Also:
KeyScanArgs
-
scan
Description copied from interface:RedisKeyAsyncCommandsIncrementally iterate the keys space.- Specified by:
scanin interfaceRedisAdvancedClusterAsyncCommands<K,V>- Specified by:
scanin interfaceRedisKeyAsyncCommands<K,V>- Overrides:
scanin classAbstractRedisAsyncCommands<K,V>- Parameters:
channel- streaming channel that receives a call for every key.scanCursor- cursor to resume from a previous scan, must not benull.- Returns:
- StreamScanCursor scan cursor.
- See Also:
RedisKeyAsyncCommands.scan(ScanCursor, ScanArgs)
-
executeOnUpstream
protected <T> Map<String,CompletableFuture<T>> executeOnUpstream(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)Run a command on all available masters,- Type Parameters:
T- result type- Parameters:
function- function producing the command- Returns:
- map of a key (counter) and commands.
-
executeOnNodes
protected <T> Map<String,CompletableFuture<T>> executeOnNodes(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function, Function<RedisClusterNode,Boolean> filter)Run a command on all available nodes that matchfilter.- Type Parameters:
T- result type- Parameters:
function- function producing the commandfilter- filter function for the node selection- Returns:
- map of a key (counter) and commands.
-
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnection, RedisCodec).