public class RedisAdvancedClusterAsyncCommandsImpl<K,V> extends AbstractRedisAsyncCommands<K,V> implements RedisAdvancedClusterAsyncCommands<K,V>
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 host and port.
|
protected io.lettuce.core.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<KeyValue<K,V>>> |
mget(Iterable<K> keys) |
RedisFuture<List<KeyValue<K,V>>> |
mget(K... keys)
Get the values of all the given keys.
|
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<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, 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, 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, lrange, lrange, lrem, lset, ltrim, migrate, migrate, move, multi, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pfadd, pfcount, pfmerge, ping, psetex, pttl, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, readOnly, readWrite, rename, renamenx, reset, restore, restore, role, rpop, rpoplpush, rpush, rpushx, sadd, save, scard, scriptExists, sdiff, sdiff, sdiffstore, select, selectAsync, set, set, setAutoFlushCommands, setbit, setex, setnx, setrange, setTimeout, setTimeout, 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, 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, setTimeout
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplication
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, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, 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, 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
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)
RedisServerAsyncCommands
clientSetname
in interface RedisServerAsyncCommands<K,V>
clientSetname
in interface RedisAdvancedClusterAsyncCommands<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)
RedisClusterAsyncCommands
slot
.clusterCountKeysInSlot
in interface RedisClusterAsyncCommands<K,V>
clusterCountKeysInSlot
in class AbstractRedisAsyncCommands<K,V>
slot
- the slotpublic RedisFuture<List<K>> clusterGetKeysInSlot(int slot, int count)
RedisClusterAsyncCommands
slot
.clusterGetKeysInSlot
in interface RedisClusterAsyncCommands<K,V>
clusterGetKeysInSlot
in class AbstractRedisAsyncCommands<K,V>
slot
- the slotcount
- maximal number of keyspublic RedisFuture<Long> dbsize()
RedisServerAsyncCommands
dbsize
in interface RedisServerAsyncCommands<K,V>
dbsize
in interface RedisAdvancedClusterAsyncCommands<K,V>
dbsize
in class AbstractRedisAsyncCommands<K,V>
RedisServerAsyncCommands.dbsize()
public RedisFuture<Long> del(K... keys)
RedisKeyAsyncCommands
del
in interface RedisKeyAsyncCommands<K,V>
del
in interface RedisAdvancedClusterAsyncCommands<K,V>
del
in interface RedisClusterAsyncCommands<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)
RedisKeyAsyncCommands
exists
in interface RedisKeyAsyncCommands<K,V>
exists
in interface RedisAdvancedClusterAsyncCommands<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()
RedisServerAsyncCommands
flushall
in interface RedisServerAsyncCommands<K,V>
flushall
in interface RedisAdvancedClusterAsyncCommands<K,V>
flushall
in class AbstractRedisAsyncCommands<K,V>
RedisServerAsyncCommands.flushall()
public RedisFuture<String> flushdb()
RedisServerAsyncCommands
flushdb
in interface RedisServerAsyncCommands<K,V>
flushdb
in interface RedisAdvancedClusterAsyncCommands<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)
RedisGeoAsyncCommands
longitude
and latitude
.georadius
in interface RedisGeoAsyncCommands<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)
RedisGeoAsyncCommands
longitude
and latitude
.georadius
in interface RedisGeoAsyncCommands<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)
RedisGeoAsyncCommands
member
. The member itself is always contained in the
results.georadiusbymember
in interface RedisGeoAsyncCommands<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)
RedisGeoAsyncCommands
member
. The member itself is always contained in the
results.georadiusbymember
in interface RedisGeoAsyncCommands<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)
RedisKeyAsyncCommands
keys
in interface RedisKeyAsyncCommands<K,V>
keys
in interface RedisAdvancedClusterAsyncCommands<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)
RedisKeyAsyncCommands
keys
in interface RedisKeyAsyncCommands<K,V>
keys
in interface RedisAdvancedClusterAsyncCommands<K,V>
keys
in class AbstractRedisAsyncCommands<K,V>
channel
- the channelpattern
- the patternpattern
.RedisKeyAsyncCommands.keys(KeyStreamingChannel, Object)
public RedisFuture<List<KeyValue<K,V>>> mget(K... keys)
RedisStringAsyncCommands
mget
in interface RedisStringAsyncCommands<K,V>
mget
in interface RedisAdvancedClusterAsyncCommands<K,V>
mget
in interface RedisClusterAsyncCommands<K,V>
mget
in class AbstractRedisAsyncCommands<K,V>
keys
- the keyRedisStringAsyncCommands.mget(Object[])
public RedisFuture<List<KeyValue<K,V>>> mget(Iterable<K> keys)
mget
in class AbstractRedisAsyncCommands<K,V>
public RedisFuture<Long> mget(KeyValueStreamingChannel<K,V> channel, K... keys)
RedisStringAsyncCommands
mget
in interface RedisStringAsyncCommands<K,V>
mget
in class AbstractRedisAsyncCommands<K,V>
channel
- the channelkeys
- the keyspublic RedisFuture<Long> mget(KeyValueStreamingChannel<K,V> channel, Iterable<K> keys)
mget
in class AbstractRedisAsyncCommands<K,V>
public RedisFuture<String> mset(Map<K,V> map)
RedisStringAsyncCommands
mset
in interface RedisStringAsyncCommands<K,V>
mset
in interface RedisAdvancedClusterAsyncCommands<K,V>
mset
in interface RedisClusterAsyncCommands<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)
RedisStringAsyncCommands
msetnx
in interface RedisStringAsyncCommands<K,V>
msetnx
in interface RedisAdvancedClusterAsyncCommands<K,V>
msetnx
in interface RedisClusterAsyncCommands<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()
RedisKeyAsyncCommands
randomkey
in interface RedisKeyAsyncCommands<K,V>
randomkey
in interface RedisAdvancedClusterAsyncCommands<K,V>
randomkey
in class AbstractRedisAsyncCommands<K,V>
RedisKeyAsyncCommands.randomkey()
public RedisFuture<String> scriptFlush()
RedisScriptingAsyncCommands
scriptFlush
in interface RedisScriptingAsyncCommands<K,V>
scriptFlush
in interface RedisAdvancedClusterAsyncCommands<K,V>
scriptFlush
in class AbstractRedisAsyncCommands<K,V>
RedisScriptingAsyncCommands.scriptFlush()
public RedisFuture<String> scriptKill()
RedisScriptingAsyncCommands
scriptKill
in interface RedisScriptingAsyncCommands<K,V>
scriptKill
in interface RedisAdvancedClusterAsyncCommands<K,V>
scriptKill
in class AbstractRedisAsyncCommands<K,V>
RedisScriptingAsyncCommands.scriptKill()
public RedisFuture<String> scriptLoad(V script)
RedisScriptingAsyncCommands
scriptLoad
in interface RedisScriptingAsyncCommands<K,V>
scriptLoad
in interface RedisAdvancedClusterAsyncCommands<K,V>
scriptLoad
in class AbstractRedisAsyncCommands<K,V>
script
- script contentpublic void shutdown(boolean save)
RedisServerAsyncCommands
shutdown
in interface RedisServerAsyncCommands<K,V>
shutdown
in interface RedisAdvancedClusterAsyncCommands<K,V>
shutdown
in class AbstractRedisAsyncCommands<K,V>
save
- true force save operationRedisServerAsyncCommands.shutdown(boolean)
public RedisFuture<Long> touch(K... keys)
RedisKeyAsyncCommands
touch
in interface RedisKeyAsyncCommands<K,V>
touch
in interface RedisAdvancedClusterAsyncCommands<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)
RedisKeyAsyncCommands
unlink
in interface RedisKeyAsyncCommands<K,V>
unlink
in interface RedisAdvancedClusterAsyncCommands<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>
public RedisClusterAsyncCommands<K,V> getConnection(String nodeId)
RedisAdvancedClusterAsyncCommands
RedisAdvancedClusterAsyncCommands
, node-connections do not route commands to other cluster
nodesgetConnection
in interface RedisAdvancedClusterAsyncCommands<K,V>
nodeId
- the node Idpublic RedisClusterAsyncCommands<K,V> getConnection(String host, int port)
RedisAdvancedClusterAsyncCommands
RedisAdvancedClusterAsyncCommands
, node-connections do not route commands to other cluster nodes. Host and port
connections are verified by default for cluster membership, see
ClusterClientOptions.isValidateClusterNodeMembership()
.getConnection
in interface RedisAdvancedClusterAsyncCommands<K,V>
host
- the hostport
- the portpublic StatefulRedisClusterConnectionImpl<K,V> getStatefulConnection()
getStatefulConnection
in interface RedisAdvancedClusterAsyncCommands<K,V>
protected io.lettuce.core.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()
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
RedisKeyAsyncCommands.scan()
public RedisFuture<KeyScanCursor<K>> scan(ScanArgs scanArgs)
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<K,V>
scan
in class AbstractRedisAsyncCommands<K,V>
scanArgs
- scan argumentsRedisKeyAsyncCommands.scan(ScanArgs)
public RedisFuture<KeyScanCursor<K>> scan(ScanCursor scanCursor, ScanArgs scanArgs)
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<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)
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<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)
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<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)
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<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)
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<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)
RedisKeyAsyncCommands
scan
in interface RedisKeyAsyncCommands<K,V>
scan
in interface RedisAdvancedClusterAsyncCommands<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)
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 selectionCopyright © 2018 lettuce.io. All rights reserved.