Module lettuce.core

Interface RedisPubSubAsyncCommands<K,​V>

Type Parameters:
K - Key type.
V - Value type.
All Superinterfaces:
BaseRedisAsyncCommands<K,​V>, RedisAclAsyncCommands<K,​V>, RedisAsyncCommands<K,​V>, RedisClusterAsyncCommands<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>
All Known Subinterfaces:
RedisClusterPubSubAsyncCommands<K,​V>
All Known Implementing Classes:
RedisClusterPubSubAsyncCommandsImpl, RedisPubSubAsyncCommandsImpl

public interface RedisPubSubAsyncCommands<K,​V>
extends RedisAsyncCommands<K,​V>
Asynchronous and thread-safe Redis PubSub API.
Since:
3.0
Author:
Mark Paluch
  • Method Details

    • psubscribe

      RedisFuture<Void> psubscribe​(K... patterns)
      Listen for messages published to channels matching the given patterns.
      Parameters:
      patterns - the patterns
      Returns:
      RedisFuture<Void> Future to synchronize psubscribe completion
    • punsubscribe

      RedisFuture<Void> punsubscribe​(K... patterns)
      Stop listening for messages posted to channels matching the given patterns.
      Parameters:
      patterns - the patterns
      Returns:
      RedisFuture<Void> Future to synchronize punsubscribe completion
    • subscribe

      RedisFuture<Void> subscribe​(K... channels)
      Listen for messages published to the given channels.
      Parameters:
      channels - the channels
      Returns:
      RedisFuture<Void> Future to synchronize subscribe completion
    • unsubscribe

      RedisFuture<Void> unsubscribe​(K... channels)
      Stop listening for messages posted to the given channels.
      Parameters:
      channels - the channels
      Returns:
      RedisFuture<Void> Future to synchronize unsubscribe completion.
    • getStatefulConnection

      StatefulRedisPubSubConnection<K,​V> getStatefulConnection()
      Specified by:
      getStatefulConnection in interface RedisAsyncCommands<K,​V>
      Returns:
      the underlying connection.