Class RedisPubSubProvider.Dispatcher

  • Enclosing class:

    public class RedisPubSubProvider.Dispatcher
    extends redis.clients.jedis.JedisPubSub
    Subscribes to the provided Redis channel pattern and dispatches received messages. Method #run must be called in a new thread.
    • Method Detail

      • awaitSubscribed

        public boolean awaitSubscribed​(long timeout,
                                       TimeUnit unit)
        To be called from the main thread to wait for subscription to be effective.
      • run

        public void run()
        To be called from a new thread to do the actual Redis subscription and to dispatch messages.
      • close

        public void close()
        To be called from the main thread to stop the subscription.
      • onPSubscribe

        public void onPSubscribe​(String pattern,
                                 int subscribedChannels)
        onPSubscribe in class redis.clients.jedis.JedisPubSub
      • proceed

        public void proceed​(redis.clients.jedis.Client client,
                            String... channels)
        proceed in class redis.clients.jedis.JedisPubSub
      • proceedWithPatterns

        public void proceedWithPatterns​(redis.clients.jedis.Client client,
                                        String... patterns)
        proceedWithPatterns in class redis.clients.jedis.JedisPubSub
      • flush

        protected void flush​(redis.clients.jedis.Client client)
      • processBinary

        protected void processBinary​(redis.clients.jedis.Client client)