Top Description Methods
reactor.core.publisher

pack-priv Interface OptimizableOperator<IN, OUT>

extends CorePublisher<IN>
Known Direct Implementers
reactor.core.publisher.FluxFromMonoOperator, reactor.core.publisher.InternalConnectableFluxOperator, reactor.core.publisher.InternalFluxOperator, reactor.core.publisher.InternalMonoOperator, reactor.core.publisher.MonoIgnorePublisher, reactor.core.publisher.FluxRepeatWhen.RepeatWhenOtherSubscriber, reactor.core.publisher.FluxReplay, reactor.core.publisher.FluxRetryWhen.RetryWhenOtherSubscriber, reactor.core.publisher.FluxSource, reactor.core.publisher.FluxSourceFuseable, reactor.core.publisher.MonoSource, reactor.core.publisher.MonoSourceFuseable, reactor.core.publisher.MonoDelayUntil, reactor.core.publisher.MonoFromFluxOperator, reactor.core.publisher.MonoFromPublisher
Type Parameters
<IN>
the CoreSubscriber data type
Imports
reactor.core.CorePublisher, .CoreSubscriber, reactor.util.annotation.Nullable

A common interface of operator in Reactor which adds contracts around subscription optimizations:
Since
3.3.0

Method Summary

Modifier and TypeMethod and Description
public OptimizableOperator<?, ? extends OUT>

Returns:

next OptimizableOperator if subscribeOrReturn(CoreSubscriber) have returned non-null result
nextOptimizableSource
()

Allow delegation of the subscription by returning the next OptimizableOperator UP in the chain, to be subscribed to next.

public CorePublisher<? extends OUT>

Returns:

CorePublisher to call CorePublisher#subscribe(CoreSubscriber) on if nextOptimizableSource() have returned null result
source
()

public CoreSubscriber<? super OUT>

Returns:

next CoreSubscriber or "null" if the subscription was already done inside the method
subscribeOrReturn
(CoreSubscriber<? super IN> actual)

Allow delegation of the subscription by returning a CoreSubscriber, or force subscription encapsulation by returning null.

Inherited from reactor.core.CorePublisher:
subscribe

Method Detail

nextOptimizableSourceback to summary
public OptimizableOperator<?, ? extends OUT> nextOptimizableSource()

Allow delegation of the subscription by returning the next OptimizableOperator UP in the chain, to be subscribed to next. This method MUST return a non-null value if the subscribeOrReturn(CoreSubscriber) method returned a non null value. In that case, this next operator can be used in conjunction with subscribeOrReturn(CoreSubscriber) to perform subscription in a loop instead of by recursion.

Returns:OptimizableOperator<?, ? extends OUT>

next OptimizableOperator if subscribeOrReturn(CoreSubscriber) have returned non-null result

Annotations
@Nullable
sourceback to summary
public CorePublisher<? extends OUT> source()
Returns:CorePublisher<? extends OUT>

CorePublisher to call CorePublisher#subscribe(CoreSubscriber) on if nextOptimizableSource() have returned null result

subscribeOrReturnback to summary
public CoreSubscriber<? super OUT> subscribeOrReturn(CoreSubscriber<? super IN> actual) throws Throwable

Allow delegation of the subscription by returning a CoreSubscriber, or force subscription encapsulation by returning null. This can be used in conjunction with nextOptimizableSource() to perform subscription in a loop instead of by recursion.

Returns:CoreSubscriber<? super OUT>

next CoreSubscriber or "null" if the subscription was already done inside the method

Annotations
@Nullable