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 a
Publisher of U
elements and map them into CompletionStage of 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
ConstructorsConstructorDescriptionCompletionStageOrderedSubscriber(Function<U, CompletionStage<D>> mapper, org.reactivestreams.Subscriber<? super D> downstreamSubscriber) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidwhenNextFinished(CompletionStage<D> completionStage, D d, Throwable throwable) This is called as each mappedCompletionStagecompletes with a value or exceptionMethods inherited from class graphql.execution.reactive.CompletionStageSubscriber
finallyAfterEachPromiseFinishes, getDownstreamSubscriber, handleThrowableDuringMapping, inFlightQIsEmpty, isTerminal, offerToInFlightQ, onComplete, onError, onNext, onSubscribeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.reactivestreams.Subscriber
onComplete, onError, onNext, onSubscribe
-
Constructor Details
-
CompletionStageOrderedSubscriber
public CompletionStageOrderedSubscriber(Function<U, CompletionStage<D>> mapper, org.reactivestreams.Subscriber<? super D> downstreamSubscriber)
-
-
Method Details
-
whenNextFinished
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
-