Interface RedisPubSubCommands

All Known Implementing Classes:
RedisPubSubConnection

public interface RedisPubSubCommands
Interface for Redis commands related to Pub/Sub messaging.
Author:
Matthew Tropiano
  • Method Details

    • psubscribe

      void psubscribe(String... patterns)

      From http://redis.io/commands/psubscribe:

      Available since 2.0.0.

      Time complexity: O(N) where N is the number of patterns the client is already subscribed to.

      Subscribes the client to the given patterns.

      Parameters:
      patterns - the patterns of channels to subscribe to.
    • punsubscribe

      void punsubscribe(String... patterns)

      From http://redis.io/commands/punsubscribe:

      Available since 2.0.0.

      Time complexity: O(N+M) where N is the number of patterns the client is already subscribed and M is the number of total patterns subscribed in the system (by any client).

      Unsubscribes the client from the given patterns, or from all of them if none is given.

      Parameters:
      patterns - the patterns of channels to subscribe to.
    • subscribe

      void subscribe(String... channels)

      From http://redis.io/commands/subscribe:

      Available since 2.0.0.

      Time complexity: O(N) where N is the number of channels to subscribe to.

      Subscribes the client to the specified channels.

      Parameters:
      channels - the channels to subscribe to.
    • unsubscribe

      void unsubscribe(String... channels)

      From http://redis.io/commands/unsubscribe:

      Available since 2.0.0.

      Time complexity: O(N) where N is the number of clients already subscribed to a channel.

      Unsubscribes the client from the given channels, or from all of them if none is given.

      Parameters:
      channels - the channels to subscribe to.