E - Type of dispatched signalpublic final class WorkQueueProcessor<E> extends FluxProcessor<IN,IN>
Created from share(), the WorkQueueProcessor will authorize concurrent publishing
(multi-producer) from its receiving side Subscriber.onNext(Object).
WorkQueueProcessor is able to replay up to its buffer size number of failed signals (either
dropped or
fatally throwing on child Subscriber.onNext(T)).
The
processor is very similar to TopicProcessor but
only partially respects the Reactive Streams contract.
The purpose of this processor is to distribute the signals to only one of the subscribed subscribers and to share the demand amongst all subscribers. The scenario is akin to Executor or Round-Robin distribution. However there is no guarantee the distribution will be respecting a round-robin distribution all the time.
The core use for this component is to scale up easily without suffering the overhead of an Executor and without using dedicated queues by subscriber, which is less used memory, less GC, more win.
| Modifier and Type | Class and Description |
|---|---|
static class |
reactor.core.publisher.EventLoopProcessor.Slot<T>
A simple reusable data container.
|
| Modifier and Type | Field and Description |
|---|---|
static boolean |
TRACEABLE_RING_BUFFER_PROCESSOR
Whether the RingBuffer*Processor can be graphed by wrapping the individual Sequence with the target downstream
|
UNSPECIFIED| Modifier and Type | Method and Description |
|---|---|
boolean |
alive()
Determine whether this
Processor can be used. |
boolean |
awaitAndShutdown()
Block until all submitted tasks have completed, then do a normal
EventLoopProcessor.shutdown(). |
boolean |
awaitAndShutdown(long timeout,
java.util.concurrent.TimeUnit timeUnit)
Block until all submitted tasks have completed, then do a normal
EventLoopProcessor#shutdown(). |
static <E> WorkQueueProcessor<E> |
create()
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. |
static <E> WorkQueueProcessor<E> |
create(boolean autoCancel)
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. |
static <E> WorkQueueProcessor<E> |
create(java.util.concurrent.ExecutorService service)
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. |
static <E> WorkQueueProcessor<E> |
create(java.util.concurrent.ExecutorService service,
boolean autoCancel)
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. |
static <E> WorkQueueProcessor<E> |
create(java.util.concurrent.ExecutorService service,
int bufferSize)
Create a new TopicProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
create(java.util.concurrent.ExecutorService service,
int bufferSize,
boolean autoCancel)
Create a new WorkQueueProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
create(java.util.concurrent.ExecutorService executor,
int bufferSize,
WaitStrategy strategy)
Create a new WorkQueueProcessor using the passed buffer size and blockingWait
Strategy settings but will auto-cancel.
|
static <E> WorkQueueProcessor<E> |
create(java.util.concurrent.ExecutorService executor,
int bufferSize,
WaitStrategy strategy,
boolean autoCancel)
Create a new WorkQueueProcessor using the passed buffer size, wait strategy
and auto-cancel settings.
|
static <E> WorkQueueProcessor<E> |
create(java.lang.String name)
Create a new TopicProcessor using the default buffer size 32, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
create(java.lang.String name,
int bufferSize)
Create a new TopicProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
create(java.lang.String name,
int bufferSize,
boolean autoCancel)
Create a new TopicProcessor using the passed buffer size, blockingWait
Strategy and the passed auto-cancel setting.
|
static <E> WorkQueueProcessor<E> |
create(java.lang.String name,
int bufferSize,
WaitStrategy strategy)
Create a new WorkQueueProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
create(java.lang.String name,
int bufferSize,
WaitStrategy strategy,
boolean autoCancel)
Create a new WorkQueueProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel settings.
|
protected void |
doComplete() |
protected void |
doError(java.lang.Throwable t) |
long |
downstreamCount()
the number of downstream receivers
|
java.util.Iterator<?> |
downstreams()
the connected data receivers
|
Flux<E> |
drain()
Drain is a hot replication of the current buffer delivered if supported.
|
Flux<IN> |
forceShutdown()
Shutdown this
Processor, forcibly halting any work currently executing and discarding any tasks that have
not yet been executed. |
long |
getAvailableCapacity() |
long |
getCapacity()
Return defined element capacity
|
java.lang.Throwable |
getError()
Current error if any, default to null
|
long |
getPending()
Return current used space in buffer
|
int |
hashCode() |
boolean |
isCancelled() |
boolean |
isStarted()
Has this upstream started or "onSubscribed" ?
|
boolean |
isTerminated()
Has this upstream finished or "completed" / "failed" ?
|
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
void |
onNext(IN o) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
protected void |
requestTask(org.reactivestreams.Subscription s) |
void |
run() |
static <E> WorkQueueProcessor<E> |
share()
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. |
static <E> WorkQueueProcessor<E> |
share(boolean autoCancel)
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. |
static <E> WorkQueueProcessor<E> |
share(java.util.concurrent.ExecutorService service)
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. |
static <E> WorkQueueProcessor<E> |
share(java.util.concurrent.ExecutorService service,
boolean autoCancel)
Create a new WorkQueueProcessor using
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. |
static <E> WorkQueueProcessor<E> |
share(java.util.concurrent.ExecutorService service,
int bufferSize)
Create a new TopicProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
share(java.util.concurrent.ExecutorService service,
int bufferSize,
boolean autoCancel)
Create a new WorkQueueProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
share(java.util.concurrent.ExecutorService executor,
int bufferSize,
WaitStrategy strategy)
Create a new WorkQueueProcessor using the passed buffer size and blockingWait
Strategy settings but will auto-cancel.
|
static <E> WorkQueueProcessor<E> |
share(java.util.concurrent.ExecutorService executor,
int bufferSize,
WaitStrategy strategy,
boolean autoCancel)
Create a new WorkQueueProcessor using the passed buffer size, wait strategy
and auto-cancel settings.
|
static <E> WorkQueueProcessor<E> |
share(java.lang.String name,
int bufferSize)
Create a new TopicProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
share(java.lang.String name,
int bufferSize,
boolean autoCancel)
Create a new TopicProcessor using the passed buffer size, blockingWait
Strategy and the passed auto-cancel setting.
|
static <E> WorkQueueProcessor<E> |
share(java.lang.String name,
int bufferSize,
WaitStrategy strategy)
Create a new WorkQueueProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel.
|
static <E> WorkQueueProcessor<E> |
share(java.lang.String name,
int bufferSize,
WaitStrategy strategy,
boolean autoCancel)
Create a new WorkQueueProcessor using the passed buffer size, blockingWait
Strategy and auto-cancel settings.
|
void |
shutdown()
Shutdown this active
Processor such that it can no longer be used. |
void |
subscribe(org.reactivestreams.Subscriber<? super E> subscriber) |
java.lang.String |
toString() |
org.reactivestreams.Subscription |
upstream()
Return the direct source of data, Supports reference.
|
connect, connectSink, connectSink, switchOnNext, wrapall, any, as, awaitOnSubscribe, blockFirst, blockFirst, blockFirstMillis, blockLast, blockLast, blockLastMillis, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, cache, cache, cast, 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, delayMillis, delayMillis, delaySubscription, delaySubscription, delaySubscriptionMillis, delaySubscriptionMillis, dematerialize, distinct, distinct, distinctUntilChanged, distinctUntilChanged, doAfterTerminate, doOnCancel, doOnComplete, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elapsed, elementAt, elementAtOrDefault, empty, error, error, every, everyFirst, filter, firstEmitting, firstEmitting, firstEmittingWith, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapIterable, flatMapIterable, from, fromArray, fromIterable, fromStream, generate, generate, generate, getPrefetch, groupBy, groupBy, groupJoin, handle, hasElement, hasElements, hide, ignoreElements, interval, interval, intervalMillis, intervalMillis, intervalMillis, intervalMillis, join, just, just, last, log, log, log, map, mapError, mapError, mapError, materialize, merge, merge, merge, merge, merge, merge, mergeWith, never, next, onAssembly, onAssembly, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureError, onBackpressureLatest, onErrorResumeWith, onErrorResumeWith, onErrorResumeWith, onErrorReturn, onErrorReturn, onErrorReturn, onTerminateDetach, parallel, parallel, parallel, process, process, process, process, publish, publish, publish, publish, publishNext, publishOn, publishOn, range, reduce, reduce, reduceWith, repeat, repeat, repeat, repeat, repeatWhen, replay, replay, retry, retry, retry, retry, retryWhen, sample, sample, sampleFirst, sampleFirst, sampleFirstMillis, sampleMillis, sampleTimeout, sampleTimeout, scan, scan, scanWith, single, singleOrDefault, singleOrEmpty, skip, skip, skipLast, skipMillis, skipMillis, skipUntil, skipUntilOther, skipWhile, startWith, startWith, startWith, 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, thenMany, thenMany, timeout, timeout, timeout, timeout, timeout, timeoutMillis, timeoutMillis, timeoutMillis, timeoutMillis, timestamp, toIterable, toIterable, toIterable, toStream, toStream, transform, using, using, window, window, window, window, window, window, window, window, windowMillis, windowMillis, windowMillis, windowMillis, windowMillis, windowMillis, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWith, zipWith, zipWith, zipWithIterable, zipWithIterableclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waithasDownstreamsexpectedFromUpstream, limit, requestedFromDownstreampublic static final boolean TRACEABLE_RING_BUFFER_PROCESSOR
public static <E> WorkQueueProcessor<E> create()
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. A new Cached ThreadExecutorPool will be implicitely created.
E - Type of processed signalspublic static <E> WorkQueueProcessor<E> create(boolean autoCancel)
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. A new Cached ThreadExecutorPool will be implicitely created.
E - Type of processed signalsautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> create(java.util.concurrent.ExecutorService service)
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. The passed ExecutorService will execute as many event-loop consuming the
ringbuffer as subscribers.E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructurepublic static <E> WorkQueueProcessor<E> create(java.util.concurrent.ExecutorService service, boolean autoCancel)
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. The passed ExecutorService will execute as many event-loop consuming the
ringbuffer as subscribers.
E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructureautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> create(java.lang.String name)
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadspublic static <E> WorkQueueProcessor<E> create(java.lang.String name, int bufferSize)
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscriberspublic static <E> WorkQueueProcessor<E> create(java.lang.String name, int bufferSize, boolean autoCancel)
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscribersautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> create(java.util.concurrent.ExecutorService service, int bufferSize)
The passed ExecutorService
will execute as many event-loop consuming the ringbuffer as subscribers.
E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscriberspublic static <E> WorkQueueProcessor<E> create(java.util.concurrent.ExecutorService service, int bufferSize, boolean autoCancel)
The passed ExecutorService
will execute as many event-loop consuming the ringbuffer as subscribers.
E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscribersautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> create(java.lang.String name, int bufferSize, WaitStrategy strategy)
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.public static <E> WorkQueueProcessor<E> create(java.lang.String name, int bufferSize, WaitStrategy strategy, boolean autoCancel)
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.autoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> create(java.util.concurrent.ExecutorService executor, int bufferSize, WaitStrategy strategy)
The passed ExecutorService will execute as many event-loop consuming the
ringbuffer as subscribers.
E - Type of processed signalsexecutor - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.public static <E> WorkQueueProcessor<E> create(java.util.concurrent.ExecutorService executor, int bufferSize, WaitStrategy strategy, boolean autoCancel)
The passed ExecutorService
will execute as many event-loop consuming the ringbuffer as subscribers.
E - Type of processed signalsexecutor - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.autoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> share()
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
A new Cached ThreadExecutorPool will be implicitely created.
E - Type of processed signalspublic static <E> WorkQueueProcessor<E> share(boolean autoCancel)
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
A new Cached ThreadExecutorPool will be implicitely created.
E - Type of processed signalsautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> share(java.util.concurrent.ExecutorService service)
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and auto-cancel. The passed ExecutorService will execute as many event-loop consuming the
ringbuffer as subscribers.E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructurepublic static <E> WorkQueueProcessor<E> share(java.util.concurrent.ExecutorService service, boolean autoCancel)
QueueSupplier.SMALL_BUFFER_SIZE backlog size,
blockingWait Strategy and the passed auto-cancel setting. A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
The passed ExecutorService will
execute as many event-loop consuming the ringbuffer as subscribers.
E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructureautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> share(java.lang.String name, int bufferSize)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscriberspublic static <E> WorkQueueProcessor<E> share(java.lang.String name, int bufferSize, boolean autoCancel)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscribersautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> share(java.util.concurrent.ExecutorService service, int bufferSize)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
The passed
ExecutorService will execute as many event-loop
consuming the ringbuffer as subscribers.
E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscriberspublic static <E> WorkQueueProcessor<E> share(java.util.concurrent.ExecutorService service, int bufferSize, boolean autoCancel)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
The passed
ExecutorService will execute as many event-loop
consuming the ringbuffer as subscribers.
E - Type of processed signalsservice - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscribersautoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> share(java.lang.String name, int bufferSize, WaitStrategy strategy)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.public static <E> WorkQueueProcessor<E> share(java.lang.String name, int bufferSize, WaitStrategy strategy, boolean autoCancel)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
A new Cached ThreadExecutorPool will be implicitely created and will use the passed name to qualify the created threads.
E - Type of processed signalsname - Use a new Cached ExecutorService and assign this name to the created
threadsbufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.autoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public static <E> WorkQueueProcessor<E> share(java.util.concurrent.ExecutorService executor, int bufferSize, WaitStrategy strategy)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
The passed ExecutorService will execute as
many event-loop consuming the ringbuffer as subscribers.
E - Type of processed signalsexecutor - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.public static <E> WorkQueueProcessor<E> share(java.util.concurrent.ExecutorService executor, int bufferSize, WaitStrategy strategy, boolean autoCancel)
A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data.
The passed
ExecutorService will execute as many event-loop
consuming the ringbuffer as subscribers.
E - Type of processed signalsexecutor - A provided ExecutorService to manage threading infrastructurebufferSize - A Backlog Size to mitigate slow subscribersstrategy - A RingBuffer WaitStrategy to use instead of the default
smart blocking wait strategy.autoCancel - Should this propagate cancellation when unregistered by all
subscribers ?public void subscribe(org.reactivestreams.Subscriber<? super E> subscriber)
subscribe in interface org.reactivestreams.Publisher<E>subscribe in class FluxProcessor<E,E>public Flux<E> drain()
Flux sequence possibly unbounded of incoming buffered values or empty if not supported.protected void doError(java.lang.Throwable t)
protected void doComplete()
protected void requestTask(org.reactivestreams.Subscription s)
public long getPending()
Trackablepublic long downstreamCount()
MultiProducerpublic void run()
public final boolean alive()
Processor can be used.Resource is alive and can be used, false otherwise.public final boolean awaitAndShutdown()
EventLoopProcessor.shutdown().public final boolean awaitAndShutdown(long timeout,
java.util.concurrent.TimeUnit timeUnit)
EventLoopProcessor#shutdown().timeout - the timeout valuetimeUnit - the unit for timeoutpublic final Flux<IN> forceShutdown()
Processor, forcibly halting any work currently executing and discarding any tasks that have
not yet been executed.public long getAvailableCapacity()
public java.util.Iterator<?> downstreams()
MultiProducerdownstreams in interface MultiProducerpublic final java.lang.Throwable getError()
Trackablepublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean isCancelled()
isCancelled in interface Trackablepublic final boolean isStarted()
Trackablepublic final boolean isTerminated()
TrackableisTerminated in interface Trackablepublic final void onComplete()
onComplete in interface org.reactivestreams.Subscriber<IN>public final void onError(java.lang.Throwable t)
onError in interface org.reactivestreams.Subscriber<IN>public final void onNext(IN o)
onNext in interface org.reactivestreams.Subscriber<IN>public final void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<IN>public final void shutdown()
Processor such that it can no longer be used. If the resource carries any work, it
will wait (but NOT blocking the caller) for all the remaining tasks to perform before closing the resource.public final org.reactivestreams.Subscription upstream()
Receiverpublic final long getCapacity()
TrackablegetCapacity in interface TrackablegetCapacity in class FluxProcessor<IN,IN>