public interface ReactivePubSubCommands
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<ReactiveSubscription> |
createSubscription()
Creates a subscription for this connection.
|
reactor.core.publisher.Mono<Void> |
pSubscribe(ByteBuffer... patterns)
Subscribes the connection to all channels matching the given
patterns . |
default reactor.core.publisher.Mono<Long> |
publish(ByteBuffer channel,
ByteBuffer message)
Publishes the given
message to the given channel . |
reactor.core.publisher.Flux<Long> |
publish(org.reactivestreams.Publisher<ReactiveSubscription.ChannelMessage<ByteBuffer,ByteBuffer>> messageStream)
Publishes the given messages to the
appropriate channels . |
reactor.core.publisher.Mono<Void> |
subscribe(ByteBuffer... channels)
Subscribes the connection to the given
channels . |
reactor.core.publisher.Mono<ReactiveSubscription> createSubscription()
ReactiveSubscription
s.default reactor.core.publisher.Mono<Long> publish(ByteBuffer channel, ByteBuffer message)
message
to the given channel
.channel
- the channel to publish to. Must not be null.message
- message to publish. Must not be null.reactor.core.publisher.Flux<Long> publish(org.reactivestreams.Publisher<ReactiveSubscription.ChannelMessage<ByteBuffer,ByteBuffer>> messageStream)
appropriate channels
.messageStream
- the messages to publish to. Must not be null.reactor.core.publisher.Mono<Void> subscribe(ByteBuffer... channels)
channels
. Once subscribed, a connection enters listening mode and
can only subscribe to other channels or unsubscribe. No other commands are accepted until the connection is
unsubscribed.
Note that cancellation of the Flux
will unsubscribe from channels
.channels
- channel names, must not be null.reactor.core.publisher.Mono<Void> pSubscribe(ByteBuffer... patterns)
patterns
. Once subscribed, a connection enters
listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the
connection is unsubscribed.
Note that cancellation of the Flux
will unsubscribe from patterns
.patterns
- channel name patterns, must not be null.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.