public class PublishSubscribeService extends Object
Modifier and Type | Field and Description |
---|---|
protected Queue<PubSubConnectionEntry> |
freePubSubConnections |
protected ConcurrentMap<String,PubSubConnectionEntry> |
name2PubSubConnection |
Constructor and Description |
---|
PublishSubscribeService(ConnectionManager connectionManager,
MasterSlaveServersConfig config) |
Modifier and Type | Method and Description |
---|---|
PubSubConnectionEntry |
getPubSubEntry(String channelName) |
AsyncSemaphore |
getSemaphore(String channelName) |
RFuture<PubSubConnectionEntry> |
psubscribe(String channelName,
Codec codec,
AsyncSemaphore semaphore,
RedisPubSubListener<?>... listeners) |
RFuture<PubSubConnectionEntry> |
psubscribe(String channelName,
Codec codec,
RedisPubSubListener<?>... listeners) |
void |
punsubscribe(String channelName,
AsyncSemaphore lock) |
void |
reattachPubSub(RedisPubSubConnection redisPubSubConnection) |
RFuture<PubSubConnectionEntry> |
subscribe(Codec codec,
String channelName,
AsyncSemaphore semaphore,
RedisPubSubListener<?>... listeners) |
RFuture<PubSubConnectionEntry> |
subscribe(Codec codec,
String channelName,
RedisPubSubListener<?>... listeners) |
void |
unsubscribe(String channelName,
AsyncSemaphore lock) |
RFuture<Codec> |
unsubscribe(String channelName,
PubSubType topicType) |
protected final ConcurrentMap<String,PubSubConnectionEntry> name2PubSubConnection
protected final Queue<PubSubConnectionEntry> freePubSubConnections
public PublishSubscribeService(ConnectionManager connectionManager, MasterSlaveServersConfig config)
public PubSubConnectionEntry getPubSubEntry(String channelName)
public RFuture<PubSubConnectionEntry> psubscribe(String channelName, Codec codec, RedisPubSubListener<?>... listeners)
public RFuture<PubSubConnectionEntry> psubscribe(String channelName, Codec codec, AsyncSemaphore semaphore, RedisPubSubListener<?>... listeners)
public RFuture<PubSubConnectionEntry> subscribe(Codec codec, String channelName, RedisPubSubListener<?>... listeners)
public RFuture<PubSubConnectionEntry> subscribe(Codec codec, String channelName, AsyncSemaphore semaphore, RedisPubSubListener<?>... listeners)
public AsyncSemaphore getSemaphore(String channelName)
public void unsubscribe(String channelName, AsyncSemaphore lock)
public RFuture<Codec> unsubscribe(String channelName, PubSubType topicType)
public void punsubscribe(String channelName, AsyncSemaphore lock)
public void reattachPubSub(RedisPubSubConnection redisPubSubConnection)
Copyright © 2014–2018 The Redisson Project. All rights reserved.