Search in sources :

Example 1 with RedisPubSubListener

use of org.redisson.client.RedisPubSubListener in project redisson by redisson.

the class PubSubConnectionEntry method removeListeners.

private void removeListeners(String channel) {
    conn.removeDisconnectListener(channel);
    SubscribeListener s = subscribeChannelListeners.remove(channel);
    conn.removeListener(s);
    Queue<RedisPubSubListener<?>> queue = channelListeners.get(channel);
    if (queue != null) {
        synchronized (queue) {
            channelListeners.remove(channel);
        }
        for (RedisPubSubListener<?> listener : queue) {
            conn.removeListener(listener);
        }
    }
}
Also used : RedisPubSubListener(org.redisson.client.RedisPubSubListener) BaseRedisPubSubListener(org.redisson.client.BaseRedisPubSubListener) SubscribeListener(org.redisson.client.SubscribeListener)

Aggregations

BaseRedisPubSubListener (org.redisson.client.BaseRedisPubSubListener)1 RedisPubSubListener (org.redisson.client.RedisPubSubListener)1 SubscribeListener (org.redisson.client.SubscribeListener)1