Package graphql.execution.reactive
Class CompletionStageOrderedSubscriber<U,D>
- java.lang.Object
-
- graphql.execution.reactive.CompletionStageSubscriber<U,D>
-
- graphql.execution.reactive.CompletionStageOrderedSubscriber<U,D>
-
- Type Parameters:
U- published upstream elementsD- mapped downstream values
- All Implemented Interfaces:
org.reactivestreams.Subscriber<U>
public class CompletionStageOrderedSubscriber<U,D> extends CompletionStageSubscriber<U,D> implements org.reactivestreams.Subscriber<U>
This subscriber can be used to map between aPublisherof U elements and map them intoCompletionStageof D promises, and it keeps them in the order the Publisher provided them.
-
-
Field Summary
-
Fields inherited from class graphql.execution.reactive.CompletionStageSubscriber
delegatingSubscription, downstreamSubscriber, inFlightDataQ, isTerminal, lock, mapper, onCompleteRun
-
-
Constructor Summary
Constructors Constructor Description CompletionStageOrderedSubscriber(java.util.function.Function<U,java.util.concurrent.CompletionStage<D>> mapper, org.reactivestreams.Subscriber<? super D> downstreamSubscriber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwhenNextFinished(java.util.concurrent.CompletionStage<D> completionStage, D d, java.lang.Throwable throwable)This is called as each mappedCompletionStagecompletes with a value or exception-
Methods inherited from class graphql.execution.reactive.CompletionStageSubscriber
finallyAfterEachPromiseFinishes, getDownstreamSubscriber, handleThrowableDuringMapping, inFlightQIsEmpty, isTerminal, offerToInFlightQ, onComplete, onError, onNext, onSubscribe
-
-
-
-
Method Detail
-
whenNextFinished
protected void whenNextFinished(java.util.concurrent.CompletionStage<D> completionStage, D d, java.lang.Throwable throwable)
Description copied from class:CompletionStageSubscriberThis is called as each mappedCompletionStagecompletes with a value or exception- Overrides:
whenNextFinishedin classCompletionStageSubscriber<U,D>- Parameters:
completionStage- the completion stage that has completedd- the value completedthrowable- or the throwable that happened during completion
-
-