public class RedisSubscription extends RedisSubscriptionConnection
RedisSubscriptionConnection.CommandTypetaskExecutor| Constructor and Description |
|---|
RedisSubscription(AsyncSocketTransport pcon,
int pdbIndex,
Executor ptaskExecutor)
Creates a RedisSubscription.
|
| Modifier and Type | Method and Description |
|---|---|
void |
subscribe(SubscriptionInfo subscriptionInfo)
Subscribe to a channel or to a channel pattern.
|
void |
unsubscribe(String channelName,
boolean isPatternSubscription)
Unsubscribe to a channel or from a channel pattern.
|
void |
unsubscribeAll(boolean isPatternSubscription)
Unsubscribe from all channels or from all channel patterns.
|
closeStaleConnection, getConnection, shutdown, submitCommandpublic RedisSubscription(AsyncSocketTransport pcon, int pdbIndex, Executor ptaskExecutor)
AsyncRedisFactory.pcon - Async Socket Transport for the connectionpdbIndex - dbIndex of the connectionptaskExecutor - Executor to use for sending the messages to the listeners. It is strongly recommended to pass a non null value.
If null an internal Thread Pool will be used to make the calls to the listeners.public void subscribe(SubscriptionInfo subscriptionInfo)
subscriptionInfo - subscription infopublic void unsubscribe(String channelName, boolean isPatternSubscription)
channelName - channel nameisPatternSubscription - true for a pattern unsubscription false otherwisepublic void unsubscribeAll(boolean isPatternSubscription)
isPatternSubscription - true for a pattern unsubscription false otherwiseCopyright © 2013- Suresh Mahalingam. All Rights Reserved.