Package graphql.execution.reactive
Class CompletionStageMappingOrderedPublisher<D,U>
java.lang.Object
graphql.execution.reactive.CompletionStageMappingPublisher<D,U>
graphql.execution.reactive.CompletionStageMappingOrderedPublisher<D,U>
- Type Parameters:
D
- the downstream typeU
- the upstream type to be mapped to
- All Implemented Interfaces:
org.reactivestreams.Publisher<D>
public class CompletionStageMappingOrderedPublisher<D,U>
extends CompletionStageMappingPublisher<D,U>
A reactive Publisher that bridges over another Publisher of `D` and maps the results
to type `U` via a CompletionStage, handling errors in that stage but keeps the results
in order of downstream publishing. This means it must queue unfinished
completion stages in memory in arrival order.
-
Field Summary
Fields inherited from class graphql.execution.reactive.CompletionStageMappingPublisher
mapper, upstreamPublisher
-
Constructor Summary
ConstructorsConstructorDescriptionCompletionStageMappingOrderedPublisher
(org.reactivestreams.Publisher<U> upstreamPublisher, Function<U, CompletionStage<D>> mapper) You need the following : -
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull org.reactivestreams.Subscriber
<? super U> createSubscriber
(org.reactivestreams.Subscriber<? super D> downstreamSubscriber) Methods inherited from class graphql.execution.reactive.CompletionStageMappingPublisher
getUpstreamPublisher, subscribe
-
Constructor Details
-
CompletionStageMappingOrderedPublisher
public CompletionStageMappingOrderedPublisher(org.reactivestreams.Publisher<U> upstreamPublisher, Function<U, CompletionStage<D>> mapper) You need the following :- Parameters:
upstreamPublisher
- an upstream source of datamapper
- a mapper function that turns upstream data into a promise of mapped D downstream data
-
-
Method Details
-
createSubscriber
protected @NonNull org.reactivestreams.Subscriber<? super U> createSubscriber(org.reactivestreams.Subscriber<? super D> downstreamSubscriber) - Overrides:
createSubscriber
in classCompletionStageMappingPublisher<D,
U>
-