public class RedisAdvancedClusterAsyncCommandsImpl<K,V> extends AbstractRedisAsyncCommands<K,V> implements RedisAdvancedClusterAsyncConnection<K,V>, RedisAdvancedClusterAsyncCommands<K,V>
codec, commandBuilder, connection, multi
Constructor and Description |
---|
RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection,
RedisCodec<K,V> codec)
Initialize a new connection.
|
Modifier and Type | Method and 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 hash
slot . |
RedisFuture<List<K>> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot . |
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>> |
executeOnMasters(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)
Run a command on all available masters,
|
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 match
filter . |
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> |
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 of
longitude and latitude . |
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 of
longitude and latitude . |
RedisFuture<Set<V>> |
georadiusbymember(K key,
V member,
double distance,
GeoArgs.Unit unit)
Retrieve members selected by distance with the center of
member . |
RedisFuture<List<GeoWithin<V>>> |
georadiusbymember(K key,
V member,
double distance,
GeoArgs.Unit unit,
GeoArgs geoArgs)
Retrieve members selected by distance with the center of
member . |
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 the nodeId.
|
protected com.lambdaworks.redis.cluster.AsyncClusterConnectionProvider |
getConnectionProvider() |
StatefulRedisClusterConnectionImpl<K,V> |
getStatefulConnection() |
RedisFuture<List<K>> |
keys(K pattern)
Find all keys matching the given pattern.
|
RedisFuture<Long> |
keys(KeyStreamingChannel<K> channel,
K pattern)
Find all keys matching the given pattern.
|
RedisFuture<List<V>> |
mget(Iterable<K> keys) |
RedisFuture<List<V>> |
mget(K... keys)
Get the values of all the given keys.
|
RedisFuture<Long> |
mget(ValueStreamingChannel<V> channel,
Iterable<K> keys) |
RedisFuture<Long> |
mget(ValueStreamingChannel<V> channel,
K... keys)
Stream 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 predicate
|
protected AsyncNodeSelection<K,V> |
nodes(Predicate<RedisClusterNode> predicate,
ClusterConnectionProvider.Intent intent,
boolean dynamic) |
RedisFuture<V> |
randomkey()
Return a random key from the keyspace.
|
AsyncNodeSelection<K,V> |
readonly(Predicate<RedisClusterNode> predicate)
Select slave 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(V script)
Load the specified Lua script into the script cache.
|
void |
shutdown(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).
|
append, asking, auth, authAsync, bgrewriteaof, bgsave, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, blpop, brpop, brpoplpush, bzpopmax, bzpopmin, clientGetname, clientKill, clientKill, clientList, clientPause, clientUnblock, close, 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, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, digest, discard, dispatch, dispatch, dispatch, dispatch, dispatch, dump, echo, eval, eval, evalsha, evalsha, exec, exists, expire, expireat, expireat, flushallAsync, flushCommands, flushdbAsync, geoadd, geoadd, geodist, geohash, geopos, georadius_ro, georadius_ro, georadius, georadiusbymember_ro, georadiusbymember_ro, georadiusbymember, get, getbit, getConnection, 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, isOpen, lastsave, lindex, linsert, llen, lpop, lpush, lpushx, lpushx, lrange, lrange, lrem, lset, ltrim, migrate, migrate, move, multi, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pfadd, pfadd, pfcount, pfcount, pfmerge, pfmerge, ping, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, readOnly, readWrite, rename, renamenx, reset, restore, restore, role, rpop, rpoplpush, rpush, rpushx, rpushx, sadd, save, scard, scriptExists, sdiff, sdiff, sdiffstore, select, selectAsync, set, set, setAutoFlushCommands, setbit, setex, setnx, setrange, setTimeout, shutdown, sinter, sinter, sinterstore, sismember, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, smembers, smembers, smove, sort, sort, sort, sort, sortStore, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, strlen, sunion, sunion, sunionstore, swapdb, sync, time, ttl, type, unwatch, waitForReplication, watch, xack, xadd, xadd, xadd, xadd, xclaim, xclaim, xdel, xgroupCreate, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xlen, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, 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, zunionstore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
all, masters, slaves, slaves
asking, 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, setTimeout
geoadd, geoadd, geodist, geohash, geopos, georadius, georadiusbymember
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
pfadd, pfcount, pfmerge
dump, expire, expireat, expireat, migrate, migrate, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, rename, renamenx, restore, restore, sort, sort, sort, sort, sortStore, ttl, type
blpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx, rpushx
digest, eval, eval, evalsha, evalsha, scriptExists
bgrewriteaof, bgsave, clientGetname, clientKill, clientKill, clientList, clientPause, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushallAsync, flushdbAsync, info, info, lastsave, save, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, sync, time
sadd, 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, sunionstore
bzpopmax, 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, zunionstore
xack, xadd, xadd, xadd, xadd, xclaim, xclaim, xdel, xgroupCreate, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xlen, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getrange, getset, incr, incrby, incrbyfloat, psetex, set, set, setbit, setex, setnx, setrange, strlen
discard, exec, multi, unwatch, watch
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, migrate, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, rename, renamenx, restore, sort, sort, sort, sort, sortStore, ttl, type
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, decr, decrby, get, getbit, getrange, getset, incr, incrby, incrbyfloat, psetex, set, set, setbit, setex, setnx, setrange, strlen
blpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx, rpushx
sadd, 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, sunionstore
zadd, zadd, zadd, zadd, zaddincr, 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
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
pfadd, pfcount, pfmerge
geoadd, geoadd, geodist, geohash, geopos, georadius, georadiusbymember
close, digest, discard, dispatch, dispatch, echo, exec, flushCommands, isOpen, multi, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, role, setAutoFlushCommands, unwatch, waitForReplication, watch
reset
public RedisAdvancedClusterAsyncCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
connection
- the stateful connectioncodec
- Codec used to encode/decode keys and values.public RedisFuture<String> clientSetname(K name)
RedisServerAsyncConnection
clientSetname
in interface RedisServerAsyncCommands<K,V>
clientSetname
in interface RedisAdvancedClusterAsyncCommands<K,V>
clientSetname
in interface RedisServerAsyncConnection<K,V>
clientSetname
in class AbstractRedisAsyncCommands<K,V>
name
- the client nameOK
if the connection name was successfully set.RedisServerAsyncCommands.clientSetname(Object)
public RedisFuture<Long> clusterCountKeysInSlot(int slot)
RedisClusterAsyncConnection
slot
.clusterCountKeysInSlot
in interface RedisClusterAsyncCommands<K,V>
clusterCountKeysInSlot
in interface RedisClusterAsyncConnection<K,V>
clusterCountKeysInSlot
in class AbstractRedisAsyncCommands<K,V>
slot
- the slotpublic RedisFuture<List<K>> clusterGetKeysInSlot(int slot, int count)
RedisClusterAsyncConnection
slot
.clusterGetKeysInSlot
in interface RedisClusterAsyncCommands<K,V>
clusterGetKeysInSlot
in interface RedisClusterAsyncConnection<K,V>
clusterGetKeysInSlot
in class AbstractRedisAsyncCommands<K,V>
slot
- the slotcount
- maximal number of keyspublic RedisFuture<Long> dbsize()
RedisServerAsyncConnection
dbsize
in interface RedisServerAsyncCommands<K,V>
dbsize
in interface RedisAdvancedClusterAsyncCommands<K,V>
dbsize
in interface RedisServerAsyncConnection<K,V>
dbsize
in class AbstractRedisAsyncCommands<K,V>
RedisServerAsyncCommands.dbsize()
public RedisFuture<Long> del(K... keys)
RedisKeysAsyncConnection
del
in interface RedisKeyAsyncCommands<K,V>
del
in interface RedisAdvancedClusterAsyncCommands<K,V>
del
in interface RedisClusterAsyncCommands<K,V>
del
in interface RedisKeysAsyncConnection<K,V>
del
in class AbstractRedisAsyncCommands<K,V>
keys
- the keysRedisKeyAsyncCommands.del(Object[])
public RedisFuture<Long> del(Iterable<K> keys)
del
in class AbstractRedisAsyncCommands<K,V>
public RedisFuture<Long> exists(K... keys)
RedisKeysAsyncConnection
exists
in interface RedisKeyAsyncCommands<K,V>
exists
in interface RedisAdvancedClusterAsyncCommands<K,V>
exists
in interface RedisKeysAsyncConnection<K,V>
exists
in class AbstractRedisAsyncCommands<K,V>
keys
- the keyspublic RedisFuture<Long> exists(Iterable<K> keys)
exists
in class AbstractRedisAsyncCommands<K,V>
public RedisFuture<String> flushall()
RedisServerAsyncConnection
flushall
in interface RedisServerAsyncCommands<K,V>
flushall
in interface RedisAdvancedClusterAsyncCommands<K,V>
flushall
in interface RedisServerAsyncConnection<K,V>
flushall
in class AbstractRedisAsyncCommands<K,V>
RedisServerAsyncCommands.flushall()
public RedisFuture<String> flushdb()
RedisServerAsyncConnection
flushdb
in interface RedisServerAsyncCommands<K,V>
flushdb
in interface RedisAdvancedClusterAsyncCommands<K,V>
flushdb
in interface RedisServerAsyncConnection<K,V>
flushdb
in class AbstractRedisAsyncCommands<K,V>
RedisServerAsyncCommands.flushdb()
public RedisFuture<Set<V>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
RedisGeoAsyncConnection
longitude
and latitude
.georadius
in interface RedisGeoAsyncCommands<K,V>
georadius
in interface RedisGeoAsyncConnection<K,V>
georadius
in class AbstractRedisAsyncCommands<K,V>
key
- the key of the geo setlongitude
- the longitude coordinate according to WGS84latitude
- the latitude coordinate according to WGS84distance
- radius distanceunit
- distance unitpublic RedisFuture<List<GeoWithin<V>>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
RedisGeoAsyncConnection
longitude
and latitude
.georadius
in interface RedisGeoAsyncCommands<K,V>
georadius
in interface RedisGeoAsyncConnection<K,V>
georadius
in class AbstractRedisAsyncCommands<K,V>
key
- the key of the geo setlongitude
- the longitude coordinate according to WGS84latitude
- the latitude coordinate according to WGS84distance
- radius distanceunit
- distance unitgeoArgs
- args to control the resultGeoWithin
contains only fields which were requested by GeoArgs
public RedisFuture<Set<V>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)
RedisGeoAsyncConnection
member
. The member itself is always contained in the
results.georadiusbymember
in interface RedisGeoAsyncCommands<K,V>
georadiusbymember
in interface RedisGeoAsyncConnection<K,V>
georadiusbymember
in class AbstractRedisAsyncCommands<K,V>
key
- the key of the geo setmember
- reference memberdistance
- radius distanceunit
- distance unitpublic RedisFuture<List<GeoWithin<V>>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
RedisGeoAsyncConnection
member
. The member itself is always contained in the
results.georadiusbymember
in interface RedisGeoAsyncCommands<K,V>
georadiusbymember
in interface RedisGeoAsyncConnection<K,V>
georadiusbymember
in class AbstractRedisAsyncCommands<K,V>
key
- the key of the geo setmember
- reference memberdistance
- radius distanceunit
- distance unitgeoArgs
- args to control the resultGeoWithin
contains only fields which were requested by GeoArgs
public RedisFuture<List<K>> keys(K pattern)
RedisKeysAsyncConnection
keys
in interface RedisKeyAsyncCommands<K,V>
keys
in interface RedisAdvancedClusterAsyncCommands<K,V>
keys
in interface RedisKeysAsyncConnection<K,V>
keys
in class AbstractRedisAsyncCommands<K,V>
pattern
- the pattern type: patternkey (pattern)pattern
.RedisKeyAsyncCommands.keys(Object)
public RedisFuture<Long> keys(KeyStreamingChannel<K> channel, K pattern)
RedisKeysAsyncConnection
keys
in interface RedisKeyAsyncCommands<K,V>
keys
in interface RedisAdvancedClusterAsyncCommands<K,V>
keys
in interface RedisKeysAsyncConnection<K,V>
keys
in class AbstractRedisAsyncCommands<K,V>
channel
- the channelpattern
- the patternpattern
.RedisKeyAsyncCommands.keys(KeyStreamingChannel, Object)
public RedisFuture<List<V>> mget(K... keys)
RedisStringsAsyncConnection
mget
in interface RedisStringAsyncCommands<K,V>
mget
in interface RedisAdvancedClusterAsyncCommands<K,V>
mget
in interface RedisClusterAsyncCommands<K,V>
mget
in interface RedisStringsAsyncConnection<K,V>
mget
in class AbstractRedisAsyncCommands<K,V>
keys
- the keyRedisStringAsyncCommands.mget(Object[])
public RedisFuture<List<V>> mget(Iterable<K> keys)
mget
in class AbstractRedisAsyncCommands<K,V>
public RedisFuture<Long> mget(ValueStreamingChannel<V> channel, K... keys)
RedisStringsAsyncConnection
mget
in interface RedisStringAsyncCommands<K,V>
mget
in interface RedisStringsAsyncConnection<K,V>
mget
in class AbstractRedisAsyncCommands<K,V>
channel
- the channelkeys
- the keyspublic RedisFuture<Long> mget(ValueStreamingChannel<V> channel, Iterable<K> keys)
mget
in class AbstractRedisAsyncCommands<K,V>
public RedisFuture<String> mset(Map<K,V> map)
RedisStringsAsyncConnection
mset
in interface RedisStringAsyncCommands<K,V>
mset
in interface RedisAdvancedClusterAsyncCommands<K,V>
mset
in interface RedisClusterAsyncCommands<K,V>
mset
in interface RedisStringsAsyncConnection<K,V>
mset
in class AbstractRedisAsyncCommands<K,V>
map
- the nullOK
since MSET
can't fail.RedisStringAsyncCommands.mset(Map)
public RedisFuture<Boolean> msetnx(Map<K,V> map)
RedisStringsAsyncConnection
msetnx
in interface RedisStringAsyncCommands<K,V>
msetnx
in interface RedisAdvancedClusterAsyncCommands<K,V>
msetnx
in interface RedisClusterAsyncCommands<K,V>
msetnx
in interface RedisStringsAsyncConnection<K,V>
msetnx
in class AbstractRedisAsyncCommands<K,V>
map
- the null1
if the all the keys were set. 0
if no key was set (at least one key already existed).RedisStringAsyncCommands.msetnx(Map)
public RedisFuture<V> randomkey()
RedisKeysAsyncConnection
randomkey
in interface RedisKeyAsyncCommands<K,V>
randomkey
in interface RedisAdvancedClusterAsyncCommands<K,V>
randomkey
in interface RedisKeysAsyncConnection<K,V>
randomkey
in class AbstractRedisAsyncCommands<K,V>
RedisKeyAsyncCommands.randomkey()
public RedisFuture<String> scriptFlush()
RedisScriptingAsyncConnection
scriptFlush
in interface RedisScriptingAsyncCommands<K,V>
scriptFlush
in interface RedisAdvancedClusterAsyncCommands<K,V>
scriptFlush
in interface RedisScriptingAsyncConnection<K,V>
scriptFlush
in class AbstractRedisAsyncCommands<K,V>
RedisScriptingAsyncCommands.scriptFlush()
public RedisFuture<String> scriptKill()
RedisScriptingAsyncConnection
scriptKill
in interface RedisScriptingAsyncCommands<K,V>
scriptKill
in interface RedisAdvancedClusterAsyncCommands<K,V>
scriptKill
in interface RedisScriptingAsyncConnection<K,V>
scriptKill
in class AbstractRedisAsyncCommands<K,V>
RedisScriptingAsyncCommands.scriptKill()
public RedisFuture<String> scriptLoad(V script)
RedisScriptingAsyncConnection
scriptLoad
in interface RedisScriptingAsyncCommands<K,V>
scriptLoad
in interface RedisAdvancedClusterAsyncCommands<K,V>
scriptLoad
in interface RedisScriptingAsyncConnection<K,V>
scriptLoad
in class AbstractRedisAsyncCommands<K,V>
script
- script contentpublic void shutdown(boolean save)
RedisServerAsyncConnection
shutdown
in interface RedisServerAsyncCommands<K,V>
shutdown
in interface RedisAdvancedClusterAsyncCommands<K,V>
shutdown
in interface RedisServerAsyncConnection<K,V>
shutdown
in class AbstractRedisAsyncCommands<K,V>
save
- true force save operationRedisServerAsyncCommands.shutdown(boolean)
public RedisFuture<Long> touch(K... keys)
RedisKeysAsyncConnection
touch
in interface RedisKeyAsyncCommands<K,V>
touch
in interface RedisAdvancedClusterAsyncCommands<K,V>
touch
in interface RedisKeysAsyncConnection<K,V>
touch
in class AbstractRedisAsyncCommands<K,V>
keys
- the keyspublic RedisFuture<Long> touch(Iterable<K> keys)
touch
in class AbstractRedisAsyncCommands<K,V>
public RedisFuture<Long> unlink(K... keys)
RedisKeysAsyncConnection
unlink
in interface RedisKeyAsyncCommands<K,V>
unlink
in interface RedisAdvancedClusterAsyncCommands<K,V>
unlink
in interface RedisKeysAsyncConnection<K,V>
unlink
in class AbstractRedisAsyncCommands<K,V>
keys
- the keysRedisKeyAsyncCommands.unlink(Object[])
public RedisFuture<Long> unlink(Iterable<K> keys)
unlink
in class AbstractRedisAsyncCommands<K,V>
protected <T> Map<String,CompletableFuture<T>> executeOnMasters(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function)
T
- result typefunction
- function producing the commandprotected <T> Map<String,CompletableFuture<T>> executeOnNodes(Function<RedisClusterAsyncCommands<K,V>,RedisFuture<T>> function, Function<RedisClusterNode,Boolean> filter)
filter
.T
- result typefunction
- function producing the commandfilter
- filter function for the node selectionpublic RedisClusterAsyncCommands<K,V> getConnection(String nodeId)
RedisAdvancedClusterAsyncConnection
nodeId
, 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 RedisAdvancedClusterAsyncCommands<K,V>
getConnection
in interface RedisAdvancedClusterAsyncConnection<K,V>
nodeId
- the node Idpublic RedisClusterAsyncCommands<K,V> getConnection(String host, int port)
RedisAdvancedClusterAsyncConnection
host
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 RedisAdvancedClusterAsyncCommands<K,V>
getConnection
in interface RedisAdvancedClusterAsyncConnection<K,V>
host
- the hostport
- the portpublic StatefulRedisClusterConnectionImpl<K,V> getStatefulConnection()
getStatefulConnection
in interface RedisAdvancedClusterAsyncCommands<K,V>
getStatefulConnection
in interface RedisAdvancedClusterAsyncConnection<K,V>
protected com.lambdaworks.redis.cluster.AsyncClusterConnectionProvider getConnectionProvider()
public AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate)
RedisAdvancedClusterAsyncCommands
NodeSelectionSupport
does
not change when the cluster view changes.nodes
in interface RedisAdvancedClusterAsyncCommands<K,V>
predicate
- Predicate to filter nodespredicate
public AsyncNodeSelection<K,V> readonly(Predicate<RedisClusterNode> predicate)
RedisAdvancedClusterAsyncCommands
NodeSelectionSupport
does not change when the cluster view changes.readonly
in interface RedisAdvancedClusterAsyncCommands<K,V>
predicate
- Predicate to filter nodespredicate
public AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, boolean dynamic)
RedisAdvancedClusterAsyncCommands
nodes
in interface RedisAdvancedClusterAsyncCommands<K,V>
predicate
- Predicate to filter nodesdynamic
- Defines, whether the set of nodes within the NodeSelectionSupport
can change when the cluster view
changes.predicate
protected AsyncNodeSelection<K,V> nodes(Predicate<RedisClusterNode> predicate, ClusterConnectionProvider.Intent intent, boolean dynamic)
public RedisFuture<KeyScanCursor<K>> scan()
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
RedisKeyAsyncCommands.scan()
public RedisFuture<KeyScanCursor<K>> scan(ScanArgs scanArgs)
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
scanArgs
- scan argumentsRedisKeyAsyncCommands.scan(ScanArgs)
public RedisFuture<KeyScanCursor<K>> scan(ScanCursor scanCursor, ScanArgs scanArgs)
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
scanCursor
- cursor to resume from a previous scan, must not be nullscanArgs
- scan argumentsRedisKeyAsyncCommands.scan(ScanCursor, ScanArgs)
public RedisFuture<KeyScanCursor<K>> scan(ScanCursor scanCursor)
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
scanCursor
- cursor to resume from a previous scan, must not be nullRedisKeyAsyncCommands.scan(ScanCursor)
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel)
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
channel
- streaming channel that receives a call for every keyRedisKeyAsyncCommands.scan(KeyStreamingChannel)
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanArgs scanArgs)
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
channel
- streaming channel that receives a call for every keyscanArgs
- scan argumentsRedisKeyAsyncCommands.scan(KeyStreamingChannel, ScanArgs)
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor, ScanArgs scanArgs)
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
channel
- streaming channel that receives a call for every keyscanCursor
- cursor to resume from a previous scan, must not be nullscanArgs
- scan argumentsRedisKeyAsyncCommands.scan(KeyStreamingChannel, ScanCursor, ScanArgs)
public RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor)
RedisKeysAsyncConnection
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in interface RedisKeysAsyncConnection<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
channel
- streaming channel that receives a call for every keyscanCursor
- cursor to resume from a previous scan, must not be nullRedisKeyAsyncCommands.scan(ScanCursor, ScanArgs)
Copyright © 2018 lettuce.io. All rights reserved.