T
- the input and output value typepublic final class EmitterProcessor<T> extends FluxProcessor<T,T> implements MultiProducer, Receiver
The default create()
factories will only produce the new elements observed in
the
parent sequence after a given Subscriber
is subscribed.
UNSPECIFIED
Modifier and Type | Method and Description |
---|---|
EmitterProcessor<T> |
connect()
Trigger onSubscribe with a stateless subscription to signal this subscriber it can start receiving
onNext, onComplete and onError calls.
|
static <E> EmitterProcessor<E> |
create()
Create a new
EmitterProcessor using QueueSupplier.SMALL_BUFFER_SIZE backlog size, blockingWait
Strategy and auto-cancel. |
static <E> EmitterProcessor<E> |
create(boolean autoCancel)
Create a new
EmitterProcessor using QueueSupplier.SMALL_BUFFER_SIZE backlog size, blockingWait
Strategy and auto-cancel. |
static <E> EmitterProcessor<E> |
create(int bufferSize)
Create a new
EmitterProcessor using QueueSupplier.SMALL_BUFFER_SIZE backlog size, blockingWait
Strategy and auto-cancel. |
static <E> EmitterProcessor<E> |
create(int bufferSize,
boolean autoCancel)
Create a new
EmitterProcessor using QueueSupplier.SMALL_BUFFER_SIZE backlog size, blockingWait
Strategy and auto-cancel. |
static <E> EmitterProcessor<E> |
create(int bufferSize,
int concurrency)
Create a new
EmitterProcessor using QueueSupplier.SMALL_BUFFER_SIZE backlog size, blockingWait
Strategy and auto-cancel. |
static <E> EmitterProcessor<E> |
create(int bufferSize,
int concurrency,
boolean autoCancel)
Create a new
EmitterProcessor using QueueSupplier.SMALL_BUFFER_SIZE backlog size, blockingWait
Strategy and auto-cancel. |
long |
downstreamCount()
the number of downstream receivers
|
Iterator<?> |
downstreams()
the connected data receivers
|
long |
expectedFromUpstream() |
long |
getCapacity()
Return defined element capacity
|
Throwable |
getError()
Current error if any, default to null
|
long |
getPending()
Return current used space in buffer
|
boolean |
isCancelled() |
boolean |
isStarted()
Has this upstream started or "onSubscribed" ?
|
boolean |
isTerminated()
Has this upstream finished or "completed" / "failed" ?
|
long |
limit() |
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(Subscription s) |
void |
subscribe(Subscriber<? super T> s) |
String |
toString() |
Subscription |
upstream()
Return the direct source of data, Supports reference.
|
connectSink, connectSink, serialize, switchOnNext, wrap
all, any, as, awaitOnSubscribe, blockFirst, blockFirst, blockFirstMillis, blockLast, blockLast, blockLastMillis, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferTimeout, bufferTimeout, bufferTimeoutMillis, bufferTimeoutMillis, bufferTimeoutMillis, bufferUntil, bufferUntil, bufferWhile, cache, cache, cache, cache, cancelOn, cast, checkpoint, checkpoint, collect, collect, collectList, collectMap, collectMap, collectMap, collectMultimap, collectMultimap, collectMultimap, collectSortedList, collectSortedList, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, compose, concat, concat, concat, concat, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatMap, concatMap, concatMapDelayError, concatMapDelayError, concatMapDelayError, concatMapIterable, concatMapIterable, concatWith, count, create, create, defaultIfEmpty, defer, delay, delayElements, delayElementsMillis, delayElementsMillis, delayMillis, delayMillis, delaySubscription, delaySubscription, delaySubscriptionMillis, delaySubscriptionMillis, dematerialize, distinct, distinct, distinctUntilChanged, distinctUntilChanged, doAfterTerminate, doFinally, doOnCancel, doOnComplete, doOnEach, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elapsed, elapsed, elementAt, elementAt, empty, error, error, filter, firstEmitting, firstEmitting, firstEmittingWith, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapIterable, flatMapIterable, flatMapSequential, flatMapSequential, flatMapSequential, flatMapSequential, from, fromArray, fromIterable, fromStream, generate, generate, generate, getPrefetch, groupBy, groupBy, groupBy, groupBy, groupJoin, handle, hasElement, hasElements, hide, ignoreElements, interval, interval, intervalMillis, intervalMillis, intervalMillis, intervalMillis, join, just, just, last, last, limitRate, log, log, log, log, map, mapError, mapError, mapError, materialize, merge, merge, merge, merge, merge, merge, merge, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeWith, never, next, ofType, onAssembly, onAssembly, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureError, onBackpressureLatest, onErrorResumeWith, onErrorResumeWith, onErrorResumeWith, onErrorReturn, onErrorReturn, onErrorReturn, onTerminateDetach, parallel, parallel, parallel, publish, publish, publish, publish, publishNext, publishOn, publishOn, publishOn, range, reduce, reduce, reduceWith, repeat, repeat, repeat, repeat, repeatWhen, replay, replay, replay, replay, replayMillis, replayMillis, retry, retry, retry, retry, retryWhen, sample, sample, sampleFirst, sampleFirst, sampleFirstMillis, sampleMillis, sampleTimeout, sampleTimeout, scan, scan, scanWith, share, single, single, singleOrEmpty, skip, skip, skipLast, skipMillis, skipMillis, skipUntil, skipUntilOther, skipWhile, sort, sort, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchOnError, switchOnError, switchOnError, switchOnNext, switchOnNext, take, take, takeLast, takeMillis, takeMillis, takeUntil, takeUntilOther, takeWhile, then, then, then, thenEmpty, thenMany, thenMany, timeout, timeout, timeout, timeout, timeout, timeoutMillis, timeoutMillis, timeoutMillis, timeoutMillis, timestamp, timestamp, toIterable, toIterable, toIterable, toStream, toStream, transform, using, using, window, window, window, window, window, window, window, window, windowMillis, windowMillis, windowMillis, windowMillis, windowMillis, windowTimeout, windowTimeoutMillis, windowTimeoutMillis, windowUntil, windowUntil, windowUntil, windowWhile, windowWhile, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWith, zipWith, zipWith, zipWithIterable, zipWithIterable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
hasDownstreams
requestedFromDownstream
public static <E> EmitterProcessor<E> create()
EmitterProcessor
using QueueSupplier.SMALL_BUFFER_SIZE
backlog size, blockingWait
Strategy and auto-cancel.E
- Type of processed signalspublic static <E> EmitterProcessor<E> create(boolean autoCancel)
EmitterProcessor
using QueueSupplier.SMALL_BUFFER_SIZE
backlog size, blockingWait
Strategy and auto-cancel.E
- Type of processed signalsautoCancel
- automatically cancelpublic static <E> EmitterProcessor<E> create(int bufferSize)
EmitterProcessor
using QueueSupplier.SMALL_BUFFER_SIZE
backlog size, blockingWait
Strategy and auto-cancel.E
- Type of processed signalsbufferSize
- the internal buffer size to hold signalspublic static <E> EmitterProcessor<E> create(int bufferSize, int concurrency)
EmitterProcessor
using QueueSupplier.SMALL_BUFFER_SIZE
backlog size, blockingWait
Strategy and auto-cancel.E
- Type of processed signalsbufferSize
- the internal buffer size to hold signalsconcurrency
- the concurrency level of the emissionpublic static <E> EmitterProcessor<E> create(int bufferSize, boolean autoCancel)
EmitterProcessor
using QueueSupplier.SMALL_BUFFER_SIZE
backlog size, blockingWait
Strategy and auto-cancel.E
- Type of processed signalsbufferSize
- the internal buffer size to hold signalsautoCancel
- automatically cancelpublic static <E> EmitterProcessor<E> create(int bufferSize, int concurrency, boolean autoCancel)
EmitterProcessor
using QueueSupplier.SMALL_BUFFER_SIZE
backlog size, blockingWait
Strategy and auto-cancel.E
- Type of processed signalsbufferSize
- the internal buffer size to hold signalsconcurrency
- the concurrency level of the emissionautoCancel
- automatically cancelpublic Subscription upstream()
Receiver
public void subscribe(Subscriber<? super T> s)
public EmitterProcessor<T> connect()
FluxProcessor
Doing so MAY allow direct UNBOUNDED onXXX calls and MAY prevent Publisher
to subscribe this
subscriber.
Note that Processor
can extend this behavior to effectively start its subscribers.
connect
in class FluxProcessor<T,T>
public long getPending()
Trackable
getPending
in interface Trackable
public void onNext(T t)
onNext
in interface Subscriber<T>
public void onError(Throwable t)
onError
in interface Subscriber<T>
public void onComplete()
onComplete
in interface Subscriber<T>
public void onSubscribe(Subscription s)
onSubscribe
in interface Subscriber<T>
public Throwable getError()
Trackable
public boolean isCancelled()
isCancelled
in interface Trackable
public final long getCapacity()
Trackable
getCapacity
in interface Trackable
getCapacity
in class FluxProcessor<T,T>
public boolean isStarted()
Trackable
public boolean isTerminated()
Trackable
isTerminated
in interface Trackable
public long limit()
public long expectedFromUpstream()
expectedFromUpstream
in interface Trackable
public Iterator<?> downstreams()
MultiProducer
downstreams
in interface MultiProducer
public long downstreamCount()
MultiProducer
downstreamCount
in interface MultiProducer