class BufferedPushStreamImpl<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> extends UnbufferedPushStreamImpl<T,U> implements PushStream<T>
AbstractPushStreamImpl.State| Modifier and Type | Field and Description |
|---|---|
private U |
eventQueue |
private int |
parallelism |
private PushbackPolicy<T,U> |
pushbackPolicy |
private QueuePolicy<T,U> |
queuePolicy |
private java.util.concurrent.Semaphore |
semaphore |
private java.util.concurrent.atomic.AtomicBoolean |
softClose
Indicates that a terminal event has been received, that we should stop
collecting new events, and that we must drain the buffer before
continuing
|
connector, upstreamclosed, next, onCloseCallback, onErrorCallback, promiseFactory, psp| Constructor and Description |
|---|
BufferedPushStreamImpl(PushStreamProvider psp,
PromiseFactory promiseFactory,
U eventQueue,
int parallelism,
QueuePolicy<T,U> queuePolicy,
PushbackPolicy<T,U> pushbackPolicy,
java.util.function.Function<PushEventConsumer<T>,java.lang.AutoCloseable> connector) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
handleEvent(PushEvent<? extends T> event) |
private void |
startWorker() |
begin, close, upstreamCloseadjustBackPressure, adjustBackPressure, allMatch, anyMatch, asyncMap, buffer, buildBuffer, check, close, close, coalesce, coalesce, coalesce, collect, count, distinct, filter, findAny, findFirst, flatMap, forEach, forEachEvent, fork, getQueueForInternalBuffering, limit, limit, map, max, merge, merge, min, noneMatch, onClose, onError, reduce, reduce, reduce, sequential, skip, sorted, sorted, split, timeout, toArray, toArray, window, window, window, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadjustBackPressure, adjustBackPressure, allMatch, anyMatch, asyncMap, buffer, buildBuffer, close, coalesce, coalesce, coalesce, collect, count, distinct, filter, findAny, findFirst, flatMap, forEach, forEachEvent, fork, limit, limit, map, max, merge, merge, min, noneMatch, onClose, onError, reduce, reduce, reduce, sequential, skip, sorted, sorted, split, timeout, toArray, toArray, window, window, window, windowprivate final U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>> eventQueue
private final java.util.concurrent.Semaphore semaphore
private final QueuePolicy<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> queuePolicy
private final PushbackPolicy<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> pushbackPolicy
private final java.util.concurrent.atomic.AtomicBoolean softClose
private final int parallelism
BufferedPushStreamImpl(PushStreamProvider psp, PromiseFactory promiseFactory, U eventQueue, int parallelism, QueuePolicy<T,U> queuePolicy, PushbackPolicy<T,U> pushbackPolicy, java.util.function.Function<PushEventConsumer<T>,java.lang.AutoCloseable> connector)
protected long handleEvent(PushEvent<? extends T> event)
handleEvent in class AbstractPushStreamImpl<T>private void startWorker()