Package org.redisson.pubsub
Class PublishSubscribeService
- java.lang.Object
-
- org.redisson.pubsub.PublishSubscribeService
-
public class PublishSubscribeService extends Object
- Author:
- Nikita Koksharov
-
-
Field Summary
Fields Modifier and Type Field Description protected Queue<PubSubConnectionEntry>
freePubSubConnections
protected ConcurrentMap<ChannelName,PubSubConnectionEntry>
name2PubSubConnection
-
Constructor Summary
Constructors Constructor Description PublishSubscribeService(ConnectionManager connectionManager, MasterSlaveServersConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PubSubConnectionEntry
getPubSubEntry(ChannelName channelName)
AsyncSemaphore
getSemaphore(ChannelName channelName)
RFuture<PubSubConnectionEntry>
psubscribe(String channelName, Codec codec, AsyncSemaphore semaphore, RedisPubSubListener<?>... listeners)
RFuture<PubSubConnectionEntry>
psubscribe(ChannelName channelName, Codec codec, RedisPubSubListener<?>... listeners)
void
punsubscribe(ChannelName channelName, AsyncSemaphore lock)
void
reattachPubSub(RedisPubSubConnection redisPubSubConnection)
RFuture<PubSubConnectionEntry>
subscribe(Codec codec, String channelName, AsyncSemaphore semaphore, RedisPubSubListener<?>... listeners)
RFuture<PubSubConnectionEntry>
subscribe(Codec codec, ChannelName channelName, RedisPubSubListener<?>... listeners)
RFuture<Codec>
unsubscribe(ChannelName channelName, PubSubType topicType)
RFuture<Void>
unsubscribe(ChannelName channelName, AsyncSemaphore lock)
-
-
-
Field Detail
-
name2PubSubConnection
protected final ConcurrentMap<ChannelName,PubSubConnectionEntry> name2PubSubConnection
-
freePubSubConnections
protected final Queue<PubSubConnectionEntry> freePubSubConnections
-
-
Constructor Detail
-
PublishSubscribeService
public PublishSubscribeService(ConnectionManager connectionManager, MasterSlaveServersConfig config)
-
-
Method Detail
-
getPubSubEntry
public PubSubConnectionEntry getPubSubEntry(ChannelName channelName)
-
psubscribe
public RFuture<PubSubConnectionEntry> psubscribe(ChannelName channelName, Codec codec, RedisPubSubListener<?>... listeners)
-
psubscribe
public RFuture<PubSubConnectionEntry> psubscribe(String channelName, Codec codec, AsyncSemaphore semaphore, RedisPubSubListener<?>... listeners)
-
subscribe
public RFuture<PubSubConnectionEntry> subscribe(Codec codec, ChannelName channelName, RedisPubSubListener<?>... listeners)
-
subscribe
public RFuture<PubSubConnectionEntry> subscribe(Codec codec, String channelName, AsyncSemaphore semaphore, RedisPubSubListener<?>... listeners)
-
getSemaphore
public AsyncSemaphore getSemaphore(ChannelName channelName)
-
unsubscribe
public RFuture<Void> unsubscribe(ChannelName channelName, AsyncSemaphore lock)
-
unsubscribe
public RFuture<Codec> unsubscribe(ChannelName channelName, PubSubType topicType)
-
punsubscribe
public void punsubscribe(ChannelName channelName, AsyncSemaphore lock)
-
reattachPubSub
public void reattachPubSub(RedisPubSubConnection redisPubSubConnection)
-
-