Top Description Inners Fields Constructors Methods
io.reactivex.internal.operators.parallel

public final Class ParallelReduceFull<T>

extends Flowable<T>
Class Inheritance
Type Parameters
<T>
the value type
Imports
java.util.concurrent.atomic.*, org.reactivestreams.*, io.reactivex.*, io.reactivex.exceptions.Exceptions, io.reactivex.functions.BiFunction, io.reactivex.internal.functions.ObjectHelper, io.reactivex.internal.subscriptions.*, io.reactivex.parallel.ParallelFlowable, io.reactivex.plugins.RxJavaPlugins

Reduces all 'rails' into a single value which then gets reduced into a single Publisher sequence.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final BiFunction<T, T, T>
pack-priv final ParallelFlowable<? extends T>

Constructor Summary

AccessConstructor and Description
public
ParallelReduceFull(ParallelFlowable<? extends T> source, BiFunction<T, T, T> reducer)

Method Summary

Modifier and TypeMethod and Description
protected void
subscribeActual(Subscriber<? super T>
the incoming Subscriber, never null
s
)

Implements abstract io.reactivex.Flowable.subscribeActual.

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.
Inherited from io.reactivex.Flowable:
allambambArrayambWithanyasblockingFirstblockingFirstblockingForEachblockingIterableblockingIterableblockingLastblockingLastblockingLatestblockingMostRecentblockingNextblockingSingleblockingSingleblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribebufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferSizecachecacheWithInitialCapacitycastcollectcollectIntocombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcomposeconcatconcatconcatconcatconcatconcatconcatArrayconcatArrayDelayErrorconcatArrayEagerconcatArrayEagerconcatArrayEagerDelayErrorconcatArrayEagerDelayErrorconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatEagerconcatEagerconcatEagerconcatEagerconcatMapconcatMapconcatMapCompletableconcatMapCompletableconcatMapCompletableDelayErrorconcatMapCompletableDelayErrorconcatMapCompletableDelayErrorconcatMapDelayErrorconcatMapDelayErrorconcatMapEagerconcatMapEagerconcatMapEagerDelayErrorconcatMapEagerDelayErrorconcatMapIterableconcatMapIterableconcatMapMaybeconcatMapMaybeconcatMapMaybeDelayErrorconcatMapMaybeDelayErrorconcatMapMaybeDelayErrorconcatMapSingleconcatMapSingleconcatMapSingleDelayErrorconcatMapSingleDelayErrorconcatMapSingleDelayErrorconcatWithconcatWithconcatWithconcatWithcontainscountcreatedebouncedebouncedebouncedefaultIfEmptydeferdelaydelaydelaydelaydelaydelaydelaySubscriptiondelaySubscriptiondelaySubscriptiondematerializedematerializedistinctdistinctdistinctdistinctUntilChangeddistinctUntilChangeddistinctUntilChangeddoAfterNextdoAfterTerminatedoFinallydoOnCanceldoOnCompletedoOnEachdoOnEachdoOnErrordoOnLifecycledoOnNextdoOnRequestdoOnSubscribedoOnTerminateelementAtelementAtelementAtOrErroremptyerrorerrorfilterfirstfirstElementfirstOrErrorflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapCompletableflatMapCompletableflatMapIterableflatMapIterableflatMapIterableflatMapIterableflatMapMaybeflatMapMaybeflatMapSingleflatMapSingleforEachforEachWhileforEachWhileforEachWhilefromArrayfromCallablefromFuturefromFuturefromFuturefromFuturefromIterablefromPublishergenerategenerategenerategenerategenerategroupBygroupBygroupBygroupBygroupBygroupBygroupJoinhideignoreElementsintervalintervalintervalintervalintervalRangeintervalRangeisEmptyjoinjustjustjustjustjustjustjustjustjustjustlastlastElementlastOrErrorliftlimitmapmaterializemergemergemergemergemergemergemergemergemergeArraymergeArraymergeArrayDelayErrormergeArrayDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeWithmergeWithmergeWithmergeWithneverobserveOnobserveOnobserveOnofTypeonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureDroponBackpressureDroponBackpressureLatestonErrorResumeNextonErrorResumeNextonErrorReturnonErrorReturnItemonExceptionResumeNextonTerminateDetachparallelparallelparallelpublishpublishpublishpublishrangerangeLongrebatchRequestsreducereducereduceWithrepeatrepeatrepeatUntilrepeatWhenreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayretryretryretryretryretryretryUntilretryWhensafeSubscribesamplesamplesamplesamplesamplesamplescanscanscanWithsequenceEqualsequenceEqualsequenceEqualsequenceEqualserializesharesinglesingleElementsingleOrErrorskipskipskipskipLastskipLastskipLastskipLastskipLastskipLastskipUntilskipWhilesortedsortedstartWithstartWithstartWithstartWithArraysubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribeOnsubscribeOnsubscribeWithswitchIfEmptyswitchMapswitchMapswitchMapCompletableswitchMapCompletableDelayErrorswitchMapDelayErrorswitchMapDelayErrorswitchMapMaybeswitchMapMaybeDelayErrorswitchMapSingleswitchMapSingleDelayErrorswitchOnNextswitchOnNextswitchOnNextDelayErrorswitchOnNextDelayErrortaketaketaketakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeUntiltakeUntiltakeWhiletesttesttestthrottleFirstthrottleFirstthrottleLastthrottleLastthrottleLatestthrottleLatestthrottleLatestthrottleLatestthrottleWithTimeoutthrottleWithTimeouttimeIntervaltimeIntervaltimeIntervaltimeIntervaltimeouttimeouttimeouttimeouttimeouttimeouttimeouttimeouttimertimertimestamptimestamptimestamptimestamptotoFuturetoListtoListtoListtoMaptoMaptoMaptoMultimaptoMultimaptoMultimaptoMultimaptoObservabletoSortedListtoSortedListtoSortedListtoSortedListunsafeCreateunsubscribeOnusingusingwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwithLatestFromwithLatestFromwithLatestFromwithLatestFromwithLatestFromwithLatestFromzipzipzipzipzipzipzipzipzipzipzipzipzipArrayzipIterablezipWithzipWithzipWithzipWith

Field Detail

reducerback to summary
pack-priv final BiFunction<T, T, T> reducer
sourceback to summary
pack-priv final ParallelFlowable<? extends T> source

Constructor Detail

ParallelReduceFullback to summary
public ParallelReduceFull(ParallelFlowable<? extends T> source, BiFunction<T, T, T> reducer)

Method Detail

subscribeActualback to summary
protected void subscribeActual(Subscriber<? super T> s)

Implements abstract io.reactivex.Flowable.subscribeActual.

Doc from io.reactivex.Flowable.subscribeActual.

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.

There is no need to call any of the plugin hooks on the current Flowable instance or the Subscriber; all hooks and basic safeguards have been applied by subscribe(Subscriber) before this method gets called.

Parameters
s:Subscriber<? super T>

the incoming Subscriber, never null

Annotations
@Override
io.reactivex.internal.operators.parallel back to summary

pack-priv final Class ParallelReduceFull.ParallelReduceFullInnerSubscriber<T>

extends AtomicReference<Subscription>
implements FlowableSubscriber<T>
Class Inheritance
All Implemented Interfaces
io.reactivex.FlowableSubscriber, org.reactivestreams.Subscriber

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv final ParallelReduceFull.ParallelReduceFullMainSubscriber<T>
pack-priv final BiFunction<T, T, T>
private static final long
pack-priv T

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public void
onError(Throwable
the throwable signaled
t
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public void
onNext(T
the element signaled
t
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
s
)

Implements io.reactivex.FlowableSubscriber.onSubscribe.

Implementors of this method should make sure everything that needs to be visible in onNext(Object) is established before calling Subscription#request(long).
Inherited from java.util.concurrent.atomic.AtomicReference:
accumulateAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetgetgetAcquiregetAndAccumulategetAndSetgetAndUpdategetOpaquegetPlainlazySetsetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

doneback to summary
pack-priv boolean done
parentback to summary
pack-priv final ParallelReduceFull.ParallelReduceFullMainSubscriber<T> parent
reducerback to summary
pack-priv final BiFunction<T, T, T> reducer
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicReference.serialVersionUID.

valueback to summary
pack-priv T value

Hides java.util.concurrent.atomic.AtomicReference.value.

Constructor Detail

ParallelReduceFullInnerSubscriberback to summary
pack-priv ParallelReduceFullInnerSubscriber(ParallelReduceFull.ParallelReduceFullMainSubscriber<T> parent, BiFunction<T, T, T> reducer)

Method Detail

cancelback to summary
pack-priv void cancel()
onCompleteback to summary
public void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
t:T

the element signaled

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Subscription s)

Implements io.reactivex.FlowableSubscriber.onSubscribe.

Doc from io.reactivex.FlowableSubscriber.onSubscribe.

Implementors of this method should make sure everything that needs to be visible in onNext(Object) is established before calling Subscription#request(long). In practice this means no initialization should happen after the request() call and additional behavior is thread safe in respect to onNext. Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
s:Subscription

Doc from org.reactivestreams.Subscriber.onSubscribe.

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override
io.reactivex.internal.operators.parallel back to summary

pack-priv final Class ParallelReduceFull.ParallelReduceFullMainSubscriber<T>

extends DeferredScalarSubscription<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final AtomicReference<ParallelReduceFull.SlotPair<T>>
pack-priv final AtomicReference<Throwable>
pack-priv final BiFunction<T, T, T>
pack-priv final AtomicInteger
private static final long
pack-priv final ParallelReduceFull.ParallelReduceFullInnerSubscriber<T>[]
Inherited from io.reactivex.internal.subscriptions.DeferredScalarSubscription:
downstreamvalue

Constructor Summary

AccessConstructor and Description
pack-priv
ParallelReduceFullMainSubscriber(Subscriber<? super T> subscriber, int n, BiFunction<T, T, T> reducer)

Method Summary

Modifier and TypeMethod and Description
pack-priv ParallelReduceFull.SlotPair<T>
addValue(T value)

public void
cancel()

Overrides io.reactivex.internal.subscriptions.DeferredScalarSubscription.cancel.

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
pack-priv void
innerComplete(T value)

pack-priv void
Inherited from io.reactivex.internal.subscriptions.DeferredScalarSubscription:
clearcompleteisCancelledisEmptypollrequestrequestFusiontryCancel

Field Detail

currentback to summary
pack-priv final AtomicReference<ParallelReduceFull.SlotPair<T>> current
errorback to summary
pack-priv final AtomicReference<Throwable> error
reducerback to summary
pack-priv final BiFunction<T, T, T> reducer
remainingback to summary
pack-priv final AtomicInteger remaining
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.reactivex.internal.subscriptions.DeferredScalarSubscription.serialVersionUID.

subscribersback to summary
pack-priv final ParallelReduceFull.ParallelReduceFullInnerSubscriber<T>[] subscribers

Constructor Detail

ParallelReduceFullMainSubscriberback to summary
pack-priv ParallelReduceFullMainSubscriber(Subscriber<? super T> subscriber, int n, BiFunction<T, T, T> reducer)

Method Detail

addValueback to summary
pack-priv ParallelReduceFull.SlotPair<T> addValue(T value)
cancelback to summary
public void cancel()

Overrides io.reactivex.internal.subscriptions.DeferredScalarSubscription.cancel.

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
innerCompleteback to summary
pack-priv void innerComplete(T value)
innerErrorback to summary
pack-priv void innerError(Throwable ex)
io.reactivex.internal.operators.parallel back to summary

pack-priv final Class ParallelReduceFull.SlotPair<T>

extends AtomicInteger
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv T
pack-priv final AtomicInteger
pack-priv T
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv int
Inherited from java.util.concurrent.atomic.AtomicInteger:
accumulateAndGetaddAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetdecrementAndGetdoubleValuefloatValuegetgetAcquiregetAndAccumulategetAndAddgetAndDecrementgetAndIncrementgetAndSetgetAndUpdategetOpaquegetPlainincrementAndGetintValuelazySetlongValuesetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

firstback to summary
pack-priv T first
releaseIndexback to summary
pack-priv final AtomicInteger releaseIndex
secondback to summary
pack-priv T second
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicInteger.serialVersionUID.

Constructor Detail

SlotPairback to summary
pack-priv SlotPair()

Method Detail

releaseSlotback to summary
pack-priv boolean releaseSlot()
tryAcquireSlotback to summary
pack-priv int tryAcquireSlot()