Top Description Constructors Methods
io.r2dbc.pool

pack-priv final Class Operators

extends Object
Class Inheritance
Imports
org.reactivestreams.Subscription, reactor.core.publisher.Mono, java.util.function.BooleanSupplier

Operator utility.
Since
0.8.8

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
The type of values in both source and output sequences.
T
>
Mono<T>

Returns:

decorated Mono.
discardOnCancel
(Mono<? extends T>
the source to decorate.
source
)

Replay signals from the source until cancellation.

public static <
The type of values in both source and output sequences.
T
>
Mono<T>

Returns:

decorated Mono.
discardOnCancel
(Mono<? extends T>
the source to decorate.
source
,
BooleanSupplier
BooleanSupplier notified when the resulting Mono receives a cancel signal. Expects the callback to return a boolean flag whether to propagate the cancellation signal upstream via true or false to drain the items and suppress upstream cancellation.
onCancel
)

Replay signals from the source until cancellation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Operatorsback to summary
private Operators()

Method Detail

discardOnCancelback to summary
public static <T> Mono<T> discardOnCancel(Mono<? extends T> source)

Replay signals from the source until cancellation. Drains the source for data signals if the subscriber cancels the subscription.

Draining data is required to complete a particular request/response window and clear the protocol state as client code expects to start a request/response conversation without leaving previous frames on the stack.

Parameters
<T>
The type of values in both source and output sequences.
source:Mono<? extends T>

the source to decorate.

Returns:Mono<T>

decorated Mono.

discardOnCancelback to summary
public static <T> Mono<T> discardOnCancel(Mono<? extends T> source, BooleanSupplier onCancel)

Replay signals from the source until cancellation. Drains the source for data signals if the subscriber cancels the subscription.

Draining data is required to complete a particular request/response window and clear the protocol state as client code expects to start a request/response conversation without leaving previous frames on the stack.

Propagate the Subscription#cancel() signal to a consumer.

Parameters
<T>
The type of values in both source and output sequences.
source:Mono<? extends T>

the source to decorate.

onCancel:BooleanSupplier

BooleanSupplier notified when the resulting Mono receives a cancel signal. Expects the callback to return a boolean flag whether to propagate the cancellation signal upstream via true or false to drain the items and suppress upstream cancellation.

Returns:Mono<T>

decorated Mono.