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