public class RedisAdvancedClusterReactiveCommandsImpl<K,V> extends AbstractRedisReactiveCommands<K,V> implements RedisAdvancedClusterReactiveCommands<K,V>
codec, commandBuilder, connection, multi
Constructor and Description |
---|
RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection,
RedisCodec<K,V> codec)
Initialize a new connection.
|
Modifier and Type | Method and Description |
---|---|
Observable<String> |
clientSetname(K name)
Set the current connection name.
|
Observable<Long> |
clusterCountKeysInSlot(int slot)
Returns the number of keys in the specified Redis Cluster hash
slot . |
Observable<K> |
clusterGetKeysInSlot(int slot,
int count)
Retrieve the list of keys within the
slot . |
Observable<Long> |
dbsize()
Return the number of keys in the selected database.
|
Observable<Long> |
del(K... keys)
Delete one or more keys.
|
protected <T> Map<String,Observable<T>> |
executeOnMasters(java.util.function.Function<RedisClusterReactiveCommands<K,V>,Observable<T>> function)
Run a command on all available masters,
|
protected <T> Map<String,Observable<T>> |
executeOnNodes(java.util.function.Function<RedisClusterReactiveCommands<K,V>,Observable<T>> function,
java.util.function.Function<RedisClusterNode,Boolean> filter)
Run a command on all available nodes that match
filter . |
Observable<String> |
flushall()
Remove all keys from all databases.
|
Observable<String> |
flushdb()
Remove all keys from the current database.
|
RedisClusterReactiveCommands<K,V> |
getConnection(String nodeId)
Retrieve a connection to the specified cluster node using the nodeId.
|
RedisClusterReactiveCommands<K,V> |
getConnection(String host,
int port)
Retrieve a connection to the specified cluster node using the nodeId.
|
StatefulRedisClusterConnection<K,V> |
getStatefulConnection() |
Observable<K> |
keys(K pattern)
Find all keys matching the given pattern.
|
Observable<Long> |
keys(KeyStreamingChannel<K> channel,
K pattern)
Find all keys matching the given pattern.
|
Observable<V> |
mget(K... keys)
Get the values of all the given keys.
|
Observable<Long> |
mget(ValueStreamingChannel<V> channel,
K... keys)
Stream over the values of all the given keys.
|
Observable<String> |
mset(Map<K,V> map)
Set multiple keys to multiple values.
|
Observable<Boolean> |
msetnx(Map<K,V> map)
Set multiple keys to multiple values, only if none of the keys exist.
|
Observable<V> |
randomkey()
Return a random key from the keyspace.
|
Observable<String> |
scriptFlush()
Remove all the scripts from the script cache.
|
Observable<String> |
scriptKill()
Kill the script currently in execution.
|
Observable<Success> |
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.
|
Observable<Long> |
unlink(K... keys)
Unlink one or more keys (non blocking DEL).
|
append, asking, auth, bgrewriteaof, bgsave, bitcount, bitcount, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, blpop, brpop, brpoplpush, clientGetname, clientKill, clientKill, clientList, clientPause, close, clusterAddSlots, clusterCountFailureReports, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, createDissolvingObservable, createDissolvingObservable, createObservable, createObservable, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, del, digest, discard, dump, echo, eval, eval, evalsha, evalsha, exec, exists, exists, expire, expireat, expireat, flushallAsync, flushdbAsync, geoadd, geoadd, geodist, geopos, georadius, georadius, georadiusbymember, georadiusbymember, get, getbit, getConnection, getrange, getset, getSuccessObservable, 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, mget, mget, 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, role, rpop, rpoplpush, rpush, rpushx, sadd, save, scan, scan, scan, scan, scan, scan, scan, scan, scard, scriptExists, scriptLoad, sdiff, sdiff, sdiffstore, select, set, set, setbit, setex, setnx, setrange, setTimeout, sinter, sinter, sinterstore, sismember, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, smembers, smembers, smove, sort, sort, sort, sort, sortStore, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, strlen, sunion, sunion, sunionstore, sync, time, ttl, type, unlink, unwatch, waitForReplication, watch, zadd, zadd, zadd, zadd, zaddincr, zcard, zcount, zcount, zincrby, zinterstore, zinterstore, zlexcount, zrange, zrange, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangeWithScores, zrangeWithScores, zrank, zrem, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunionstore, zunionstore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asking, auth, clusterAddSlots, clusterCountFailureReports, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, readOnly, readWrite, setTimeout
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, move, objectEncoding, objectIdletime, objectRefcount, persist, pexpire, pexpireat, pexpireat, pttl, rename, renamenx, restore, scan, scan, scan, scan, scan, scan, scan, scan, sort, sort, sort, sort, sortStore, ttl, type
append, bitcount, bitcount, 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, lrange, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smove, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstore
zadd, zadd, zadd, zadd, zaddincr, zcard, zcount, zcount, zincrby, zinterstore, zinterstore, zlexcount, zrange, zrange, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangeWithScores, zrangeWithScores, zrank, zrem, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunionstore, zunionstore
digest, eval, eval, evalsha, evalsha, scriptExists, scriptLoad
bgrewriteaof, bgsave, clientGetname, clientKill, clientKill, clientList, clientPause, 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
pfadd, pfcount, pfmerge
geoadd, geoadd, geodist, geopos, georadius, georadius, georadiusbymember, georadiusbymember
close, echo, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, waitForReplication
public RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnectionImpl<K,V> connection, RedisCodec<K,V> codec)
connection
- the stateful connectioncodec
- Codec used to encode/decode keys and values.public Observable<Long> del(K... keys)
RedisKeyReactiveCommands
del
in interface RedisKeyReactiveCommands<K,V>
del
in interface RedisAdvancedClusterReactiveCommands<K,V>
del
in interface RedisClusterReactiveCommands<K,V>
del
in class AbstractRedisReactiveCommands<K,V>
keys
- the keyspublic Observable<Long> unlink(K... keys)
RedisKeyReactiveCommands
unlink
in interface RedisKeyReactiveCommands<K,V>
unlink
in interface RedisAdvancedClusterReactiveCommands<K,V>
unlink
in class AbstractRedisReactiveCommands<K,V>
keys
- the keyspublic Observable<V> mget(K... keys)
RedisStringReactiveCommands
mget
in interface RedisStringReactiveCommands<K,V>
mget
in interface RedisAdvancedClusterReactiveCommands<K,V>
mget
in interface RedisClusterReactiveCommands<K,V>
mget
in class AbstractRedisReactiveCommands<K,V>
keys
- the keypublic Observable<Long> mget(ValueStreamingChannel<V> channel, K... keys)
RedisStringReactiveCommands
mget
in interface RedisStringReactiveCommands<K,V>
mget
in class AbstractRedisReactiveCommands<K,V>
channel
- the channelkeys
- the keyspublic Observable<Boolean> msetnx(Map<K,V> map)
RedisStringReactiveCommands
msetnx
in interface RedisStringReactiveCommands<K,V>
msetnx
in interface RedisAdvancedClusterReactiveCommands<K,V>
msetnx
in interface RedisClusterReactiveCommands<K,V>
msetnx
in class AbstractRedisReactiveCommands<K,V>
map
- the null1
if the all the keys were set. 0
if no key was set (at least one key already existed).public Observable<String> mset(Map<K,V> map)
RedisStringReactiveCommands
mset
in interface RedisStringReactiveCommands<K,V>
mset
in interface RedisAdvancedClusterReactiveCommands<K,V>
mset
in interface RedisClusterReactiveCommands<K,V>
mset
in class AbstractRedisReactiveCommands<K,V>
map
- the nullOK
since MSET
can't fail.public Observable<K> clusterGetKeysInSlot(int slot, int count)
RedisClusterReactiveCommands
slot
.clusterGetKeysInSlot
in interface RedisClusterReactiveCommands<K,V>
clusterGetKeysInSlot
in class AbstractRedisReactiveCommands<K,V>
slot
- the slotcount
- maximal number of keyspublic Observable<Long> clusterCountKeysInSlot(int slot)
RedisClusterReactiveCommands
slot
.clusterCountKeysInSlot
in interface RedisClusterReactiveCommands<K,V>
clusterCountKeysInSlot
in class AbstractRedisReactiveCommands<K,V>
slot
- the slotpublic Observable<String> clientSetname(K name)
RedisServerReactiveCommands
clientSetname
in interface RedisServerReactiveCommands<K,V>
clientSetname
in interface RedisAdvancedClusterReactiveCommands<K,V>
clientSetname
in class AbstractRedisReactiveCommands<K,V>
name
- the client nameOK
if the connection name was successfully set.public Observable<Long> dbsize()
RedisServerReactiveCommands
dbsize
in interface RedisServerReactiveCommands<K,V>
dbsize
in interface RedisAdvancedClusterReactiveCommands<K,V>
dbsize
in class AbstractRedisReactiveCommands<K,V>
public Observable<String> flushall()
RedisServerReactiveCommands
flushall
in interface RedisServerReactiveCommands<K,V>
flushall
in interface RedisAdvancedClusterReactiveCommands<K,V>
flushall
in class AbstractRedisReactiveCommands<K,V>
public Observable<String> flushdb()
RedisServerReactiveCommands
flushdb
in interface RedisServerReactiveCommands<K,V>
flushdb
in interface RedisAdvancedClusterReactiveCommands<K,V>
flushdb
in class AbstractRedisReactiveCommands<K,V>
public Observable<K> keys(K pattern)
RedisKeyReactiveCommands
keys
in interface RedisKeyReactiveCommands<K,V>
keys
in interface RedisAdvancedClusterReactiveCommands<K,V>
keys
in class AbstractRedisReactiveCommands<K,V>
pattern
- the pattern type: patternkey (pattern)pattern
.public Observable<Long> keys(KeyStreamingChannel<K> channel, K pattern)
RedisKeyReactiveCommands
keys
in interface RedisKeyReactiveCommands<K,V>
keys
in interface RedisAdvancedClusterReactiveCommands<K,V>
keys
in class AbstractRedisReactiveCommands<K,V>
channel
- the channelpattern
- the patternpattern
.public Observable<V> randomkey()
RedisKeyReactiveCommands
randomkey
in interface RedisKeyReactiveCommands<K,V>
randomkey
in interface RedisAdvancedClusterReactiveCommands<K,V>
randomkey
in class AbstractRedisReactiveCommands<K,V>
public Observable<String> scriptFlush()
RedisScriptingReactiveCommands
scriptFlush
in interface RedisScriptingReactiveCommands<K,V>
scriptFlush
in interface RedisAdvancedClusterReactiveCommands<K,V>
scriptFlush
in class AbstractRedisReactiveCommands<K,V>
public Observable<String> scriptKill()
RedisScriptingReactiveCommands
scriptKill
in interface RedisScriptingReactiveCommands<K,V>
scriptKill
in interface RedisAdvancedClusterReactiveCommands<K,V>
scriptKill
in class AbstractRedisReactiveCommands<K,V>
public Observable<Success> shutdown(boolean save)
RedisServerReactiveCommands
shutdown
in interface RedisServerReactiveCommands<K,V>
shutdown
in interface RedisAdvancedClusterReactiveCommands<K,V>
shutdown
in class AbstractRedisReactiveCommands<K,V>
save
- true force save operationprotected <T> Map<String,Observable<T>> executeOnMasters(java.util.function.Function<RedisClusterReactiveCommands<K,V>,Observable<T>> function)
T
- result typefunction
- function producing the commandprotected <T> Map<String,Observable<T>> executeOnNodes(java.util.function.Function<RedisClusterReactiveCommands<K,V>,Observable<T>> function, java.util.function.Function<RedisClusterNode,Boolean> filter)
filter
.T
- result typefunction
- function producing the commandfilter
- filter function for the node selectionpublic StatefulRedisClusterConnection<K,V> getStatefulConnection()
getStatefulConnection
in interface RedisAdvancedClusterReactiveCommands<K,V>
public RedisClusterReactiveCommands<K,V> getConnection(String nodeId)
RedisAdvancedClusterReactiveCommands
RedisAdvancedClusterReactiveCommands
, node-connections do not route commands to other cluster
nodesgetConnection
in interface RedisAdvancedClusterReactiveCommands<K,V>
nodeId
- the node Idpublic RedisClusterReactiveCommands<K,V> getConnection(String host, int port)
RedisAdvancedClusterReactiveCommands
RedisAdvancedClusterReactiveCommands
, node-connections do not route commands to other cluster nodesgetConnection
in interface RedisAdvancedClusterReactiveCommands<K,V>
host
- the hostport
- the portCopyright © 2016. All rights reserved.