Top Description Inners Fields Constructors Methods
reactor.core.publisher

pack-priv final Class ParallelReduceSeed<T, R>

extends ParallelFlux<R>
implements Scannable, Fuseable
Class Inheritance
All Implemented Interfaces
reactor.core.Fuseable, reactor.core.Scannable
Type Parameters
<T>
the input value type
<R>
the result value type
Imports
java.util.Objects, java.util.function.BiFunction, .Supplier, org.reactivestreams.Subscriber, reactor.core.CoreSubscriber, .Fuseable, .Scannable, reactor.util.annotation.Nullable

Reduce the sequence of values in each 'rail' to a single value.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final Supplier<R>
pack-priv final BiFunction<R, ? super T, R>
pack-priv final ParallelFlux<? extends T>

Constructor Summary

AccessConstructor and Description
pack-priv
ParallelReduceSeed(ParallelFlux<? extends T> source, Supplier<R> initialSupplier, BiFunction<R, ? super T, R> reducer)

Method Summary

Modifier and TypeMethod and Description
public int
getPrefetch()

Overrides reactor.core.publisher.ParallelFlux.getPrefetch.

The prefetch configuration of the component
public int
parallelism()

Implements abstract reactor.core.publisher.ParallelFlux.parallelism.

Returns the number of expected parallel Subscribers.
pack-priv void
reportError(Subscriber<?>[] subscribers, Throwable ex)

public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public void
subscribe(CoreSubscriber<? super R>[]
the subscribers array to run in parallel, the number of items must be equal to the parallelism level of this ParallelFlux
subscribers
)

Implements abstract reactor.core.publisher.ParallelFlux.subscribe.

Subscribes an array of Subscribers to this ParallelFlux and triggers the execution chain for all 'rails'.
Inherited from reactor.core.publisher.ParallelFlux:
ascheckpointcheckpointcheckpointcollectcollectSortedListcollectSortedListconcatMapconcatMapconcatMapconcatMapDelayErrorconcatMapDelayErrorconcatMapDelayErrordoAfterTerminatedoOnCanceldoOnCompletedoOnEachdoOnErrordoOnNextdoOnRequestdoOnSignaldoOnSubscribedoOnTerminatefilterflatMapflatMapflatMapflatMapfromfromfromfromfromgroupshideloglogloglogmapnameonAssemblyorderedorderedreducereducerunOnrunOnsequentialsequentialsortedsortedsortedMergersubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribetagthentoStringtransformtransformGroupsvalidate

Field Detail

initialSupplierback to summary
pack-priv final Supplier<R> initialSupplier
reducerback to summary
pack-priv final BiFunction<R, ? super T, R> reducer
sourceback to summary
pack-priv final ParallelFlux<? extends T> source

Constructor Detail

ParallelReduceSeedback to summary
pack-priv ParallelReduceSeed(ParallelFlux<? extends T> source, Supplier<R> initialSupplier, BiFunction<R, ? super T, R> reducer)

Method Detail

getPrefetchback to summary
public int getPrefetch()

Overrides reactor.core.publisher.ParallelFlux.getPrefetch.

Doc from reactor.core.publisher.ParallelFlux.getPrefetch.

The prefetch configuration of the component

Returns:int

the prefetch configuration of the component

Annotations
@Override
parallelismback to summary
public int parallelism()

Implements abstract reactor.core.publisher.ParallelFlux.parallelism.

Doc from reactor.core.publisher.ParallelFlux.parallelism.

Returns the number of expected parallel Subscribers.

Returns:int

the number of expected parallel Subscribers

Annotations
@Override
reportErrorback to summary
pack-priv void reportError(Subscriber<?>[] subscribers, Throwable ex)
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
@Nullable
subscribeback to summary
public void subscribe(CoreSubscriber<? super R>[] subscribers)

Implements abstract reactor.core.publisher.ParallelFlux.subscribe.

Doc from reactor.core.publisher.ParallelFlux.subscribe.

Subscribes an array of Subscribers to this ParallelFlux and triggers the execution chain for all 'rails'.

Parameters
subscribers:CoreSubscriber<? super R>[]

the subscribers array to run in parallel, the number of items must be equal to the parallelism level of this ParallelFlux

Annotations
@Override
reactor.core.publisher back to summary

pack-priv final Class ParallelReduceSeed.ParallelReduceSeedSubscriber<T, R>

extends Operators.BaseFluxToMonoOperator<T, R>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv R
pack-priv boolean
pack-priv final BiFunction<R, ? super T, R>
Inherited from reactor.core.publisher.Operators.BaseFluxToMonoOperator:
actualhasRequestsstateSTATE

Constructor Summary

AccessConstructor and Description
pack-priv
ParallelReduceSeedSubscriber(CoreSubscriber<? super R> subscriber, R initialValue, BiFunction<R, ? super T, R> reducer)

Method Summary

Modifier and TypeMethod and Description
pack-priv R
accumulatedValue()

Implements abstract reactor.core.publisher.Operators.BaseFluxToMonoOperator.accumulatedValue.

This method is being called either during onComplete invocation in case request has happened before, or during request invocation in case onComplete with no values has happened before.
public void
cancel()

Overrides reactor.core.publisher.Operators.BaseFluxToMonoOperator.cancel.

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
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 Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.Operators.BaseFluxToMonoOperator.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
Inherited from reactor.core.publisher.Operators.BaseFluxToMonoOperator:
actualclearcompletePossiblyEmptyisEmptyonSubscribepollrequestrequestFusionsize

Field Detail

accumulatorback to summary
pack-priv R accumulator
doneback to summary
pack-priv boolean done
reducerback to summary
pack-priv final BiFunction<R, ? super T, R> reducer

Constructor Detail

ParallelReduceSeedSubscriberback to summary
pack-priv ParallelReduceSeedSubscriber(CoreSubscriber<? super R> subscriber, R initialValue, BiFunction<R, ? super T, R> reducer)

Method Detail

accumulatedValueback to summary
pack-priv R accumulatedValue()

Implements abstract reactor.core.publisher.Operators.BaseFluxToMonoOperator.accumulatedValue.

Doc from reactor.core.publisher.Operators.BaseFluxToMonoOperator.accumulatedValue.

This method is being called either during onComplete invocation in case request has happened before, or during request invocation in case onComplete with no values has happened before.

Note

, this method expectedly returns null if cancellation happened before

Returns:R

accumulated/default value or null if cancelled before

Annotations
@Override
cancelback to summary
public void cancel()

Overrides reactor.core.publisher.Operators.BaseFluxToMonoOperator.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
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
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides reactor.core.publisher.Operators.BaseFluxToMonoOperator.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override