trait SubscribeCommands extends AnyRef
SubscribeClient is used to (un)subscribe messages from redis' PUB/SUB subsystem. Once a client enters PUB/SUB state by subscribing to some channel/pattern, it should not issue any other commands, except the (un)subscribe commands, until it exits from the PUB/SUB state, by unsubscribing from all the channels and patterns. For this reason, we put the (un)subscribe commands here, separately from the other ordinary commands.
- Self Type
- Client
- Alphabetic
- By Inheritance
- SubscribeCommands
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pSubscribe(patterns: Seq[Buf])(handler: MessageHandler): Future[Map[Buf, Throwable]]
Subscribe to patterns.
Subscribe to patterns. Messages received from the subscribed patterns will be processed by the handler.
A pattern will be subscribed to only once. Subscribing to an already subscribed pattern will be ignored. Although a Seq is passed in as argument, the patterns are subscribed to one by one, with individual commands, and when the client is connected to multiple server nodes, it is not guaranteed that they are subscribed to from the same node.
When the Future returned by this method is completed, it is guaranteed that an attempt is made, to send a pSubscribe command for each of the patterns that is not subscribed to yet. And the failed subscriptions are returned as a map from the failed channel to the exception object. Subscriptions will be managed by the SubscriptionManager, even if it failed at the first attempt. In that case, subsequent attempts will be made regularly until the pattern is subscribed to successfully, or the subscription is cancelled by calling the pUnsubscribed method.
- def pUnsubscribe(patterns: Seq[Buf]): Future[Map[Buf, Throwable]]
Unsubscribe from patterns.
Unsubscribe from patterns. The subscriptions to the specified patterns are removed from the SubscriptionManager. An unsubscribe command is sent for each of the succeeded subscriptions, and the failed ones are returned as a Future of map from the pattern to the exception object.
- def subscribe(channels: Seq[Buf])(handler: MessageHandler): Future[Map[Buf, Throwable]]
Subscribe to channels.
Subscribe to channels. Messages received from the subscribed channels will be processed by the handler.
A channel will be subscribed to only once. Subscribing to an already subscribed channel will be ignored. Although a Seq is passed in as argument, the channels are subscribed to one by one, with individual commands, and when the client is connected to multiple server nodes, it is not guaranteed that they are subscribed to from the same node.
When the Future returned by this method is completed, it is guaranteed that an attempt is made, to send a subscribe command for each of the channels that is not subscribed to yet. And the failed subscriptions are returned as a map from the failed channel to the exception object. Subscriptions will be managed by the SubscriptionManager, even if it failed at the first attempt. In that case, subsequent attempts will be made regularly until the channel is subscribed to successfully, or the subscription is cancelled by calling the unsubscribed method.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unsubscribe(channels: Seq[Buf]): Future[Map[Buf, Throwable]]
Unsubscribe from channels.
Unsubscribe from channels. The subscriptions to the specified channels are removed from the SubscriptionManager. An unsubscribe command is sent for each of the succeeded subscriptions, and the failed ones are returned as a Future of map from the channel to the exception object.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()