K
- Key type.V
- Value type.public class RedisPubSubReactiveCommandsImpl<K,V> extends RedisReactiveCommandsImpl<K,V> implements RedisPubSubReactiveCommands<K,V>
Constructor and Description |
---|
RedisPubSubReactiveCommandsImpl(StatefulRedisPubSubConnection<K,V> connection,
RedisCodec<K,V> codec)
Initialize a new connection.
|
Modifier and Type | Method and Description |
---|---|
StatefulRedisPubSubConnection<K,V> |
getStatefulConnection() |
Flux<ChannelMessage<K,V>> |
observeChannels()
Flux for messages (message) received though channel subscriptions.
|
Flux<ChannelMessage<K,V>> |
observeChannels(FluxSink.OverflowStrategy overflowStrategy)
Flux for messages (message) received though channel subscriptions.
|
Flux<PatternMessage<K,V>> |
observePatterns()
Flux for messages (pmessage) received though pattern subscriptions.
|
Flux<PatternMessage<K,V>> |
observePatterns(FluxSink.OverflowStrategy overflowStrategy)
Flux for messages (pmessage) received though pattern subscriptions.
|
Mono<Void> |
psubscribe(K... patterns)
Listen for messages published to channels matching the given patterns.
|
Mono<Long> |
publish(K channel,
V message)
Post a message to a channel.
|
Flux<K> |
pubsubChannels(K channel)
Lists the currently *active channels*.
|
Mono<Map<K,Long>> |
pubsubNumsub(K... channels)
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.
|
Mono<Void> |
punsubscribe(K... patterns)
Stop listening for messages posted to channels matching the given patterns.
|
Mono<Void> |
subscribe(K... channels)
Listen for messages published to the given channels.
|
Mono<Void> |
unsubscribe(K... channels)
Stop listening for messages posted to the given channels.
|
aclCat, aclCat, aclDeluser, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami, append, asking, auth, auth, bgrewriteaof, bgsave, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, blmove, blmove, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, bzpopmax, bzpopmax, bzpopmin, bzpopmin, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientPause, clientSetname, clientTracking, clientUnblock, close, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterCountKeysInSlot, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterGetKeysInSlot, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicas, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, copy, copy, createDissolvingFlux, createFlux, createMono, createMono, dbsize, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, del, del, digest, digest, discard, dispatch, dispatch, dump, echo, eval, eval, eval, eval, evalsha, evalsha, exec, exists, exists, exists, expire, expire, expireat, expireat, expireat, flushall, flushall, flushallAsync, flushCommands, flushdb, flushdb, flushdbAsync, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius_ro, georadius_ro, georadius, georadius, georadius, georadiusbymember_ro, georadiusbymember_ro, georadiusbymember, georadiusbymember, georadiusbymember, 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, keys, keys, lastsave, lindex, linsert, llen, lmove, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, memoryUsage, mget, mget, mget, mget, mget, migrate, migrate, move, mset, msetnx, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pfadd, pfadd, pfcount, pfcount, pfmerge, pfmerge, ping, psetex, pttl, pubsubChannels, pubsubNumpat, quit, randomkey, readOnly, readWrite, rename, renamenx, replicaof, replicaofNoOne, reset, restore, restore, role, rpop, rpop, rpoplpush, rpush, rpushx, sadd, save, scan, scan, scan, scan, scan, scan, scan, scan, scard, scriptExists, scriptFlush, scriptFlush, scriptKill, scriptLoad, scriptLoad, sdiff, sdiff, sdiffstore, select, set, set, setAutoFlushCommands, setbit, setex, setGet, setGet, setnx, setrange, setTimeout, shutdown, 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, touch, touch, ttl, type, unlink, unlink, 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, zunionWithScores
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
auth, auth, select, swapdb
asking, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterCountKeysInSlot, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterGetKeysInSlot, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicas, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, del, mget, mset, msetnx, readOnly, readWrite, setTimeout
dispatch, dispatch, echo, flushCommands, isOpen, ping, pubsubChannels, pubsubNumpat, quit, reset, role, setAutoFlushCommands, waitForReplication
aclCat, aclCat, aclDeluser, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadius, georadius, georadiusbymember, georadiusbymember, georadiusbymember, geosearch, geosearch, geosearchstore
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
pfadd, pfcount, pfmerge
copy, copy, dump, exists, expire, expire, expireat, expireat, expireat, keys, keys, migrate, migrate, move, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pttl, randomkey, rename, renamenx, restore, restore, scan, scan, scan, scan, scan, scan, scan, scan, sort, sort, sort, sort, sortStore, touch, ttl, type, unlink
blmove, blmove, blpop, blpop, brpop, brpop, brpoplpush, brpoplpush, lindex, linsert, llen, lmove, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpop, rpoplpush, rpush, rpushx
digest, digest, eval, eval, eval, eval, evalsha, evalsha, scriptExists, scriptFlush, scriptFlush, scriptKill, scriptLoad, scriptLoad
bgrewriteaof, bgsave, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientPause, clientSetname, clientTracking, clientUnblock, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, dbsize, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, flushall, flushall, flushallAsync, flushdb, flushdb, flushdbAsync, info, info, lastsave, memoryUsage, replicaof, replicaofNoOne, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, time
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, sunionstore
bzpopmax, bzpopmax, bzpopmin, 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, zunionWithScores
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
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getdel, getex, getrange, getset, incr, incrby, incrbyfloat, mget, psetex, set, set, setbit, setex, setGet, setGet, setnx, setrange, stralgoLcs, strlen
public RedisPubSubReactiveCommandsImpl(StatefulRedisPubSubConnection<K,V> connection, RedisCodec<K,V> codec)
connection
- the connection .codec
- Codec used to encode/decode keys and values.public Flux<PatternMessage<K,V>> observePatterns()
RedisPubSubReactiveCommands
RedisPubSubReactiveCommands.psubscribe(Object[])
.
Warning! This method uses FluxSink.OverflowStrategy.BUFFER
This does unbounded buffering
and may lead to OutOfMemoryError
. Use RedisPubSubReactiveCommands.observePatterns(FluxSink.OverflowStrategy)
to specify a different
strategy.
observePatterns
in interface RedisPubSubReactiveCommands<K,V>
public Flux<PatternMessage<K,V>> observePatterns(FluxSink.OverflowStrategy overflowStrategy)
RedisPubSubReactiveCommands
RedisPubSubReactiveCommands.psubscribe(Object[])
.observePatterns
in interface RedisPubSubReactiveCommands<K,V>
overflowStrategy
- the overflow strategy to use.public Flux<ChannelMessage<K,V>> observeChannels()
RedisPubSubReactiveCommands
RedisPubSubReactiveCommands.subscribe(Object[])
.
Warning! This method uses FluxSink.OverflowStrategy.BUFFER
This does unbounded buffering
and may lead to OutOfMemoryError
. Use RedisPubSubReactiveCommands.observeChannels(FluxSink.OverflowStrategy)
to specify a different
strategy.
observeChannels
in interface RedisPubSubReactiveCommands<K,V>
public Flux<ChannelMessage<K,V>> observeChannels(FluxSink.OverflowStrategy overflowStrategy)
RedisPubSubReactiveCommands
RedisPubSubReactiveCommands.subscribe(Object[])
.observeChannels
in interface RedisPubSubReactiveCommands<K,V>
overflowStrategy
- the overflow strategy to use.public Mono<Void> psubscribe(K... patterns)
RedisPubSubReactiveCommands
Mono
completes without a result as
soon as the pattern subscription is registered.psubscribe
in interface RedisPubSubReactiveCommands<K,V>
patterns
- the patterns.psubscribe
command.public Mono<Void> punsubscribe(K... patterns)
RedisPubSubReactiveCommands
Mono
completes without a result
as soon as the pattern subscription is unregistered.punsubscribe
in interface RedisPubSubReactiveCommands<K,V>
patterns
- the patterns.punsubscribe
command.public Mono<Void> subscribe(K... channels)
RedisPubSubReactiveCommands
Mono
completes without a result as soon as the *
subscription is registered.subscribe
in interface RedisPubSubReactiveCommands<K,V>
channels
- the channels.subscribe
command.public Mono<Void> unsubscribe(K... channels)
RedisPubSubReactiveCommands
Mono
completes without a result as soon as the
subscription is unregistered.unsubscribe
in interface RedisPubSubReactiveCommands<K,V>
channels
- the channels.unsubscribe
command.public Mono<Long> publish(K channel, V message)
BaseRedisReactiveCommands
publish
in interface BaseRedisReactiveCommands<K,V>
publish
in class AbstractRedisReactiveCommands<K,V>
channel
- the channel type: key.message
- the message type: value.public Flux<K> pubsubChannels(K channel)
BaseRedisReactiveCommands
pubsubChannels
in interface BaseRedisReactiveCommands<K,V>
pubsubChannels
in class AbstractRedisReactiveCommands<K,V>
channel
- the key.public Mono<Map<K,Long>> pubsubNumsub(K... channels)
BaseRedisReactiveCommands
pubsubNumsub
in interface BaseRedisReactiveCommands<K,V>
pubsubNumsub
in class AbstractRedisReactiveCommands<K,V>
channels
- channel keys.public StatefulRedisPubSubConnection<K,V> getStatefulConnection()
getStatefulConnection
in interface RedisReactiveCommands<K,V>
getStatefulConnection
in interface RedisPubSubReactiveCommands<K,V>
getStatefulConnection
in class RedisReactiveCommandsImpl<K,V>
Copyright © 2022 lettuce.io. All rights reserved.