java.lang.Object
io.lettuce.core.AbstractRedisAsyncCommands<K,V>
io.lettuce.core.RedisAsyncCommandsImpl<K,V>
io.lettuce.core.pubsub.RedisPubSubAsyncCommandsImpl<K,V>
io.lettuce.core.cluster.RedisClusterPubSubAsyncCommandsImpl<K,V>
- Type Parameters:
K- Key type.V- Value type.
- All Implemented Interfaces:
BaseRedisAsyncCommands<K,V>,RedisAclAsyncCommands<K,V>,RedisAsyncCommands<K,V>,RedisGeoAsyncCommands<K,V>,RedisHashAsyncCommands<K,V>,RedisHLLAsyncCommands<K,V>,RedisKeyAsyncCommands<K,V>,RedisListAsyncCommands<K,V>,RedisScriptingAsyncCommands<K,V>,RedisServerAsyncCommands<K,V>,RedisSetAsyncCommands<K,V>,RedisSortedSetAsyncCommands<K,V>,RedisStreamAsyncCommands<K,V>,RedisStringAsyncCommands<K,V>,RedisTransactionalAsyncCommands<K,V>,RedisClusterAsyncCommands<K,V>,RedisClusterPubSubAsyncCommands<K,V>,RedisPubSubAsyncCommands<K,V>
public class RedisClusterPubSubAsyncCommandsImpl<K,V> extends RedisPubSubAsyncCommandsImpl<K,V> implements RedisClusterPubSubAsyncCommands<K,V>
An asynchronous and thread-safe API for a Redis pub/sub connection.
- Since:
- 5.0
- Author:
- Mark Paluch
-
Constructor Summary
Constructors Constructor Description RedisClusterPubSubAsyncCommandsImpl(StatefulRedisPubSubConnection<K,V> connection, RedisCodec<K,V> codec)Initialize a new connection. -
Method Summary
Modifier and Type Method Description RedisFuture<Set<V>>georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)Retrieve members selected by distance with the center oflongitudeandlatitude.RedisFuture<List<GeoWithin<V>>>georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Retrieve members selected by distance with the center oflongitudeandlatitude.RedisFuture<Set<V>>georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)Retrieve members selected by distance with the center ofmember.RedisFuture<List<GeoWithin<V>>>georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Retrieve members selected by distance with the center ofmember.io.lettuce.core.cluster.StatefulRedisClusterPubSubConnectionImpl<K,V>getStatefulConnection()PubSubAsyncNodeSelection<K,V>nodes(Predicate<RedisClusterNode> predicate)Select nodes by a predicate.Methods inherited from class io.lettuce.core.pubsub.RedisPubSubAsyncCommandsImpl
psubscribe, publish, pubsubChannels, pubsubNumsub, punsubscribe, subscribe, unsubscribeMethods inherited from class io.lettuce.core.AbstractRedisAsyncCommands
aclCat, aclCat, aclDeluser, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoami, append, asking, auth, auth, auth, auth, bgrewriteaof, bgsave, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, blmove, blpop, brpop, brpoplpush, bzpopmax, bzpopmin, clientCaching, clientGetname, clientGetredir, clientId, clientKill, clientKill, clientList, clientPause, clientSetname, clientTracking, clientUnblock, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterCountKeysInSlot, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterGetKeysInSlot, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, command, commandCount, commandInfo, commandInfo, configGet, configResetstat, configRewrite, configSet, copy, copy, dbsize, debugCrashAndRecover, debugHtstats, debugObject, debugOom, debugReload, debugRestart, debugSdslen, debugSegfault, decr, decrby, del, del, digest, digest, discard, dispatch, dispatch, dispatch, dispatch, dispatch, dump, echo, eval, eval, eval, eval, evalsha, evalsha, exec, exists, exists, expire, expire, expireat, expireat, expireat, flushall, flushall, flushallAsync, flushCommands, flushdb, flushdb, flushdbAsync, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadius_ro, georadius_ro, georadiusbymember, georadiusbymember_ro, georadiusbymember_ro, geosearch, geosearch, geosearchstore, get, getbit, getConnection, getdel, getex, getrange, getset, hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvals, incr, incrby, incrbyfloat, info, info, isOpen, 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, migrate, migrate, move, mset, msetnx, multi, objectEncoding, objectFreq, objectIdletime, objectRefcount, persist, pexpire, pexpire, pexpireat, pexpireat, pexpireat, pfadd, pfcount, pfmerge, ping, psetex, pttl, pubsubChannels, pubsubNumpat, quit, randomkey, readOnly, readWrite, rename, renamenx, 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, zunionWithScoresMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.lettuce.core.api.async.BaseRedisAsyncCommands
dispatch, dispatch, echo, flushCommands, isOpen, ping, publish, pubsubChannels, pubsubChannels, pubsubNumpat, pubsubNumsub, quit, reset, role, setAutoFlushCommands, waitForReplicationMethods inherited from interface io.lettuce.core.api.async.RedisAclAsyncCommands
aclCat, aclCat, aclDeluser, aclGenpass, aclGenpass, aclGetuser, aclList, aclLoad, aclLog, aclLog, aclLogReset, aclSave, aclSetuser, aclUsers, aclWhoamiMethods inherited from interface io.lettuce.core.api.async.RedisAsyncCommands
auth, auth, select, swapdbMethods inherited from interface io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands
asking, clusterAddSlots, clusterBumpepoch, clusterCountFailureReports, clusterCountKeysInSlot, clusterDelSlots, clusterFailover, clusterFlushslots, clusterForget, clusterGetKeysInSlot, clusterInfo, clusterKeyslot, clusterMeet, clusterMyId, clusterNodes, clusterReplicate, clusterReset, clusterSaveconfig, clusterSetConfigEpoch, clusterSetSlotImporting, clusterSetSlotMigrating, clusterSetSlotNode, clusterSetSlotStable, clusterSlaves, clusterSlots, del, mget, mset, msetnx, readOnly, readWrite, setTimeoutMethods inherited from interface io.lettuce.core.cluster.pubsub.api.async.RedisClusterPubSubAsyncCommands
all, masters, replicas, replicas, slaves, slaves, upstreamMethods inherited from interface io.lettuce.core.api.async.RedisGeoAsyncCommands
geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geohash, geopos, georadius, georadiusbymember, geosearch, geosearch, geosearchstoreMethods inherited from interface io.lettuce.core.api.async.RedisHashAsyncCommands
hdel, hexists, hget, hgetall, hgetall, hincrby, hincrbyfloat, hkeys, hkeys, hlen, hmget, hmget, hmset, hrandfield, hrandfield, hrandfieldWithvalues, hrandfieldWithvalues, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, hvalsMethods inherited from interface io.lettuce.core.api.async.RedisHLLAsyncCommands
pfadd, pfcount, pfmergeMethods inherited from interface io.lettuce.core.api.async.RedisKeyAsyncCommands
copy, copy, dump, 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, unlinkMethods inherited from interface io.lettuce.core.api.async.RedisListAsyncCommands
blmove, blpop, brpop, brpoplpush, lindex, linsert, llen, lmove, lpop, lpop, lpos, lpos, lpos, lpos, lpush, lpushx, lrange, lrange, lrem, lset, ltrim, rpop, rpop, rpoplpush, rpush, rpushxMethods inherited from interface io.lettuce.core.pubsub.api.async.RedisPubSubAsyncCommands
psubscribe, punsubscribe, subscribe, unsubscribeMethods inherited from interface io.lettuce.core.api.async.RedisScriptingAsyncCommands
digest, digest, eval, eval, eval, eval, evalsha, evalsha, scriptExists, scriptFlush, scriptFlush, scriptKill, scriptLoad, scriptLoadMethods inherited from interface io.lettuce.core.api.async.RedisServerAsyncCommands
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, save, shutdown, slaveof, slaveofNoOne, slowlogGet, slowlogGet, slowlogLen, slowlogReset, timeMethods inherited from interface io.lettuce.core.api.async.RedisSetAsyncCommands
sadd, scard, sdiff, sdiff, sdiffstore, sinter, sinter, sinterstore, sismember, smembers, smembers, smismember, smove, spop, spop, srandmember, srandmember, srandmember, srem, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sscan, sunion, sunion, sunionstoreMethods inherited from interface io.lettuce.core.api.async.RedisSortedSetAsyncCommands
bzpopmax, bzpopmin, zadd, zadd, zadd, zadd, zadd, zadd, zaddincr, zaddincr, zcard, zcount, zcount, zcount, zdiff, zdiffstore, zdiffWithScores, zincrby, zinter, zinter, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrangebylex, zrangebylex, zrangebylex, zrangebylex, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscore, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangebyscoreWithScores, zrangestorebylex, zrangestorebyscore, zrangeWithScores, zrangeWithScores, zrank, zrem, zremrangebylex, zremrangebylex, zremrangebyrank, zremrangebyscore, zremrangebyscore, zremrangebyscore, zrevrange, zrevrange, zrevrangebylex, zrevrangebylex, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscore, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangebyscoreWithScores, zrevrangestorebylex, zrevrangestorebyscore, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscan, zscore, zunion, zunion, zunionstore, zunionstore, zunionWithScores, zunionWithScoresMethods inherited from interface io.lettuce.core.api.async.RedisStreamAsyncCommands
xack, xadd, xadd, xadd, xadd, xautoclaim, xclaim, xclaim, xdel, xgroupCreate, xgroupCreate, xgroupCreateconsumer, xgroupDelconsumer, xgroupDestroy, xgroupSetid, xinfoConsumers, xinfoGroups, xinfoStream, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xread, xread, xreadgroup, xreadgroup, xrevrange, xrevrange, xtrim, xtrim, xtrimMethods inherited from interface io.lettuce.core.api.async.RedisStringAsyncCommands
append, bitcount, bitcount, bitfield, bitopAnd, bitopNot, bitopOr, bitopXor, bitpos, bitpos, bitpos, decr, decrby, get, getbit, getdel, getex, getrange, getset, incr, incrby, incrbyfloat, mget, psetex, set, set, setbit, setex, setGet, setGet, setnx, setrange, stralgoLcs, strlen
-
Constructor Details
-
RedisClusterPubSubAsyncCommandsImpl
public RedisClusterPubSubAsyncCommandsImpl(StatefulRedisPubSubConnection<K,V> connection, RedisCodec<K,V> codec)Initialize a new connection.- Parameters:
connection- the connection .codec- Codec used to encode/decode keys and values.
-
-
Method Details
-
georadius
public RedisFuture<Set<V>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center oflongitudeandlatitude.- Specified by:
georadiusin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.longitude- the longitude coordinate according to WGS84.latitude- the latitude coordinate according to WGS84.distance- radius distance.unit- distance unit.- Returns:
- bulk reply.
-
georadius
public RedisFuture<List<GeoWithin<V>>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center oflongitudeandlatitude.- Specified by:
georadiusin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.longitude- the longitude coordinate according to WGS84.latitude- the latitude coordinate according to WGS84.distance- radius distance.unit- distance unit.geoArgs- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithincontains only fields which were requested byGeoArgs.
-
georadiusbymember
Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center ofmember. The member itself is always contained in the results.- Specified by:
georadiusbymemberin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusbymemberin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.member- reference member.distance- radius distance.unit- distance unit.- Returns:
- set of members.
-
georadiusbymember
public RedisFuture<List<GeoWithin<V>>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)Description copied from interface:RedisGeoAsyncCommandsRetrieve members selected by distance with the center ofmember. The member itself is always contained in the results.- Specified by:
georadiusbymemberin interfaceRedisGeoAsyncCommands<K,V>- Overrides:
georadiusbymemberin classAbstractRedisAsyncCommands<K,V>- Parameters:
key- the key of the geo set.member- reference member.distance- radius distance.unit- distance unit.geoArgs- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithincontains only fields which were requested byGeoArgs.
-
getStatefulConnection
public io.lettuce.core.cluster.StatefulRedisClusterPubSubConnectionImpl<K,V> getStatefulConnection()- Specified by:
getStatefulConnectionin interfaceRedisAsyncCommands<K,V>- Specified by:
getStatefulConnectionin interfaceRedisClusterPubSubAsyncCommands<K,V>- Specified by:
getStatefulConnectionin interfaceRedisPubSubAsyncCommands<K,V>- Overrides:
getStatefulConnectionin classRedisPubSubAsyncCommandsImpl<K,V>- Returns:
- the underlying connection.
-
nodes
Description copied from interface:RedisClusterPubSubAsyncCommandsSelect nodes by a predicate.- Specified by:
nodesin interfaceRedisClusterPubSubAsyncCommands<K,V>- Parameters:
predicate- Predicate to filter nodes- Returns:
- API with asynchronous executed commands on a selection of cluster nodes matching
predicate
-