← ZIO Redis docs

RedisSubscription

zio.redis.RedisSubscription
See theRedisSubscription companion object

Attributes

Companion
object
Source
RedisSubscription.scala
Graph
Supertypes
trait Subscription
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

final def pSubscribe(pattern: String, patterns: String*): ResultStreamBuilder1[{ type lambda = [x] =>> (String, x); }#<none>]

Subscribe to messages published to all channels that match the given patterns.

Subscribe to messages published to all channels that match the given patterns.

Value parameters

pattern

Pattern to subscribing to matching channels. (for the more details about pattern format, see https://redis.io/commands/psubscribe)

patterns

Patterns to subscribing to matching channels consecutively.

Attributes

Returns

Returns stream that emits published value keyed by the matching channel name.

Inherited from:
Subscription
Source
Subscription.scala
final def pSubscribeWith(pattern: String, patterns: String*)(onSubscribe: PubSubCallback = ..., onUnsubscribe: PubSubCallback = ...): ResultStreamBuilder1[{ type lambda = [x] =>> (String, x); }#<none>]

Subscribe to messages published to all channels that match the given pattern with callbacks for PSubscribe and PUnsubscribe messages.

Subscribe to messages published to all channels that match the given pattern with callbacks for PSubscribe and PUnsubscribe messages.

Value parameters

onSubscribe

Callback for given pattern and the number of subscribers of pattern from upstream when subscribed.

onUnsubscribe

Callback for given pattern and the number of subscribers of pattern from upstream when unsubscribed.

pattern

Pattern to subscribing to matching channels. (for the more details about pattern format, see https://redis.io/commands/psubscribe)

patterns

Patterns to subscribing to matching channels consecutively.

Attributes

Inherited from:
Subscription
Source
Subscription.scala
final def pUnsubscribe(patterns: String*): IO[RedisError, Unit]

Unsubscribes the client from the given patterns, or from all of them if none is given.

Unsubscribes the client from the given patterns, or from all of them if none is given.

Value parameters

patterns

Patterns to unsubscribe from. if this is empty, all patterns that this client is subscribed to will be unsubscribed.

Attributes

Returns

Returns unit if successful, error otherwise.

Inherited from:
Subscription
Source
Subscription.scala
final def subscribe(channel: String, channels: String*): ResultStreamBuilder1[{ type lambda = [x] =>> (String, x); }#<none>]

Subscribes the client to the specified channels.

Subscribes the client to the specified channels.

Value parameters

channel

Channel name to subscribe to.

channels

Channel names to subscribe to consecutively.

Attributes

Returns

Returns stream that emits published value keyed by that channel name for the given channels.

Inherited from:
Subscription
Source
Subscription.scala

Subscribes the client to the specified channel.

Subscribes the client to the specified channel.

Value parameters

channel

Channel name to subscribe to.

Attributes

Returns

Returns stream that only emits published value for the given channel.

Inherited from:
Subscription
Source
Subscription.scala
final def subscribeSingleWith(channel: String)(onSubscribe: PubSubCallback = ..., onUnsubscribe: PubSubCallback = ...): ResultStreamBuilder1[Id]

Subscribes the client to the specified channel with callbacks for Subscribe and Unsubscribe messages.

Subscribes the client to the specified channel with callbacks for Subscribe and Unsubscribe messages.

Value parameters

channel

Channel name to subscribe to.

onSubscribe

Callback for given channel name and the number of subscribers of channel from upstream when subscribed.

onUnsubscribe

Callback for given channel name and the number of subscribers of channel from upstream when unsubscribed.

Attributes

Inherited from:
Subscription
Source
Subscription.scala
final def subscribeWith(channel: String, channels: String*)(onSubscribe: PubSubCallback = ..., onUnsubscribe: PubSubCallback = ...): ResultStreamBuilder1[{ type lambda = [x] =>> (String, x); }#<none>]

Subscribes the client to the specified channels with callbacks for Subscribe and Unsubscribe messages.

Subscribes the client to the specified channels with callbacks for Subscribe and Unsubscribe messages.

Value parameters

channel

Channel name to subscribe to.

channels

Channel names to subscribe to consecutively.

onSubscribe

Callback for given channel name and the number of subscribers of channel from upstream when subscribed.

onUnsubscribe

Callback for given channel name and the number of subscribers of channel from upstream when unsubscribed.

Attributes

Returns

Returns stream that emits published value keyed by that channel name for the given channels.

Inherited from:
Subscription
Source
Subscription.scala
final def unsubscribe(channels: String*): IO[RedisError, Unit]

Unsubscribes the client from the given channels, or from all of them if none is given.

Unsubscribes the client from the given channels, or from all of them if none is given.

Value parameters

channels

Channels to unsubscribe from. if this is empty, all channels that this client is subscribed to will be unsubscribed.

Attributes

Returns

Returns unit if successful, error otherwise.

Inherited from:
Subscription
Source
Subscription.scala

Inherited and Abstract methods

protected def codecSupplier: CodecSupplier

Attributes

Inherited from:
SubscribeEnvironment (hidden)
Source
SubscribeEnvironment.scala
protected def executor: SubscriptionExecutor

Attributes

Inherited from:
SubscribeEnvironment (hidden)
Source
SubscribeEnvironment.scala

Implicits

Inherited implicits

final implicit protected def codec[A : Schema]: BinaryCodec[A]

Attributes

Inherited from:
SubscribeEnvironment (hidden)
Source
SubscribeEnvironment.scala