Interface ConditionalSubscriber<T>

Type Parameters:
T - the value type
All Superinterfaces:
FlowableSubscriber<T>, org.reactivestreams.Subscriber<T>
All Known Implementing Classes:
BasicFuseableConditionalSubscriber, FlowableDistinctUntilChanged.DistinctUntilChangedConditionalSubscriber, FlowableDistinctUntilChanged.DistinctUntilChangedSubscriber, FlowableDoAfterNext.DoAfterConditionalSubscriber, FlowableDoFinally.DoFinallyConditionalSubscriber, FlowableDoOnEach.DoOnEachConditionalSubscriber, FlowableFilter.FilterConditionalSubscriber, FlowableFilter.FilterSubscriber, FlowableMap.MapConditionalSubscriber, FlowableMapOptional.MapOptionalConditionalSubscriber, FlowableMapOptional.MapOptionalSubscriber, FlowableSkipUntil.SkipUntilMainSubscriber, FlowableWithLatestFrom.WithLatestFromSubscriber, FlowableWithLatestFromMany.WithLatestFromSubscriber, ParallelDoOnNextTry.ParallelDoOnNextConditionalSubscriber, ParallelDoOnNextTry.ParallelDoOnNextSubscriber, ParallelFilter.BaseFilterSubscriber, ParallelFilter.ParallelFilterConditionalSubscriber, ParallelFilter.ParallelFilterSubscriber, ParallelFilterTry.BaseFilterSubscriber, ParallelFilterTry.ParallelFilterConditionalSubscriber, ParallelFilterTry.ParallelFilterSubscriber, ParallelMap.ParallelMapConditionalSubscriber, ParallelMapOptional.ParallelMapConditionalSubscriber, ParallelMapOptional.ParallelMapSubscriber, ParallelMapTry.ParallelMapTryConditionalSubscriber, ParallelMapTry.ParallelMapTrySubscriber, ParallelMapTryOptional.ParallelMapTryConditionalSubscriber, ParallelMapTryOptional.ParallelMapTrySubscriber

public interface ConditionalSubscriber<@NonNull T> extends FlowableSubscriber<T>
A FlowableSubscriber with an additional tryOnNext(Object) method that tells the caller the specified value has been accepted or not.

This allows certain queue-drain or source-drain operators to avoid requesting 1 on behalf of a dropped value.

Since:
3.1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Conditionally takes the value.

    Methods inherited from interface io.reactivex.rxjava3.core.FlowableSubscriber

    onSubscribe

    Methods inherited from interface org.reactivestreams.Subscriber

    onComplete, onError, onNext
  • Method Details

    • tryOnNext

      boolean tryOnNext(@NonNull @NonNull T t)
      Conditionally takes the value.
      Parameters:
      t - the value to deliver
      Returns:
      true if the value has been accepted, false if the value has been rejected and the next value can be sent immediately