public class DrainUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
postComplete(org.reactivestreams.Subscriber<? super T> downstream,
Queue<T> queue,
AtomicLong requested,
BooleanSupplier isCancelled)
Tries draining the queue if the source just completed.
|
static <T> boolean |
postCompleteRequest(long n,
org.reactivestreams.Subscriber<? super T> downstream,
Queue<T> queue,
AtomicLong requested,
BooleanSupplier isCancelled)
Perform a potential post-completion request accounting.
|
public static <T> boolean postCompleteRequest(long n,
org.reactivestreams.Subscriber<? super T> downstream,
Queue<T> queue,
AtomicLong requested,
BooleanSupplier isCancelled)
T - the output value typen - the requested amountdownstream - the downstream consumerqueue - the queue holding the available valuesrequested - the requested atomic longisCancelled - callback to detect cancellationpublic static <T> void postComplete(org.reactivestreams.Subscriber<? super T> downstream,
Queue<T> queue,
AtomicLong requested,
BooleanSupplier isCancelled)
T - the output value typedownstream - the downstream consumerqueue - the queue holding available valuesrequested - the atomic long keeping track of requestsisCancelled - callback to detect cancellationCopyright © 2019–2020 SmallRye. All rights reserved.