public abstract class FanInAction<I,E,O,SUBSCRIBER extends FanInAction.InnerSubscriber<I,E,O>> extends Action<E,O>
| Modifier and Type | Class and Description |
|---|---|
static class |
FanInAction.InnerSubscriber<I,E,O> |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
COMPLETING |
protected reactor.core.Dispatcher |
dispatcher |
protected static int |
NOT_STARTED |
protected static int |
RUNNING |
capacity, downstreamSubscription, NO_CAPACITY, RESERVED_SLOTS, upstreamSubscription| Constructor and Description |
|---|
FanInAction(reactor.core.Dispatcher dispatcher) |
FanInAction(reactor.core.Dispatcher dispatcher,
java.util.List<? extends org.reactivestreams.Publisher<? extends I>> publishers) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPublisher(org.reactivestreams.Publisher<? extends I> publisher) |
void |
cancel()
Stop consuming signals from upstream.
|
protected boolean |
checkDynamicMerge() |
protected FanInSubscription<I,E,O,SUBSCRIBER> |
createFanInSubscription() |
protected abstract FanInAction.InnerSubscriber<I,E,O> |
createSubscriber() |
protected void |
doOnSubscribe(org.reactivestreams.Subscription subscription) |
Action<?,?> |
dynamicMergeAction() |
reactor.core.Dispatcher |
getDispatcher()
Get the dispatcher used to execute signals on this Stream instance.
|
FanInSubscription<I,E,O,SUBSCRIBER> |
getSubscription()
Get the current upstream subscription if any
|
protected long |
initUpstreamPublisherAndCapacity() |
void |
onNext(E ev) |
void |
requestMore(long n)
Request the next n elements from the source
|
protected void |
requestUpstream(long capacity,
boolean terminated,
long elements) |
void |
scheduleCompletion() |
void |
subscribe(org.reactivestreams.Subscriber<? super O> subscriber)
--------------------------------------------------------------------------------------------------------
ACTION SIGNAL HANDLING
--------------------------------------------------------------------------------------------------------
|
java.lang.String |
toString() |
accept, addSubscription, broadcastComplete, broadcastError, broadcastNext, cancelSubscription, capacity, checkRequest, combine, control, createSubscription, createSubscription, createTrackingSubscription, debug, doComplete, doError, doNext, doShutdown, doStart, downstreamSubscription, evaluateCapacity, findOldestUpstream, getCapacity, isPublishing, onComplete, onError, onOverflowBuffer, onSubscribe, recycle, requestAll, subscribeWithSubscription, toBroadcastCompleteConsumer, toBroadcastErrorConsumer, toBroadcastNextConsumeradaptiveConsume, adaptiveConsumeOn, after, batchConsume, batchConsumeOn, broadcast, broadcastOn, broadcastTo, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, cache, cast, concatMap, concatWith, consume, consume, consume, consume, consume, consumeLater, consumeOn, consumeOn, consumeOn, count, count, decode, defaultIfEmpty, dematerialize, dispatchOn, dispatchOn, dispatchOn, distinct, distinct, distinctUntilChanged, distinctUntilChanged, elapsed, elementAt, elementAtOrDefault, encode, env, exists, fanIn, filter, filter, finallyDo, flatMap, getEnvironment, getTimer, groupBy, ignoreError, ignoreError, isReactivePull, join, joinWith, keepAlive, last, lift, log, log, map, materialize, merge, mergeWith, nest, next, observe, observeCancel, observeComplete, observeError, observeStart, observeSubscribe, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturn, onOverflowBuffer, onOverflowDrop, partition, partition, process, recover, reduce, reduce, repeat, repeat, repeatWhen, requestWhen, retry, retry, retry, retry, retryWhen, sample, sample, sample, sample, sample, sample, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, scan, scan, skip, skip, skip, skipWhile, skipWhile, sort, sort, sort, sort, split, split, startWith, startWith, startWith, subscribe, subscribeOn, subscribeOn, subscribeOn, switchMap, take, take, take, takeWhile, tap, throttle, throttle, timeout, timeout, timeout, timeout, timestamp, toBlockingQueue, toBlockingQueue, toList, toList, unbounded, when, window, window, window, window, window, window, window, window, window, window, window, zip, zipWith, zipWithprotected static final int NOT_STARTED
protected static final int RUNNING
protected static final int COMPLETING
protected final reactor.core.Dispatcher dispatcher
public FanInAction(reactor.core.Dispatcher dispatcher)
public FanInAction(reactor.core.Dispatcher dispatcher,
java.util.List<? extends org.reactivestreams.Publisher<? extends I>> publishers)
public void subscribe(org.reactivestreams.Subscriber<? super O> subscriber)
Actionpublic void addPublisher(org.reactivestreams.Publisher<? extends I> publisher)
public void scheduleCompletion()
public void cancel()
ControlPushSubscription.terminated flag.public Action<?,?> dynamicMergeAction()
protected void doOnSubscribe(org.reactivestreams.Subscription subscription)
doOnSubscribe in class Action<E,O>protected long initUpstreamPublisherAndCapacity()
protected final boolean checkDynamicMerge()
public void onNext(E ev)
public void requestMore(long n)
ControlrequestMore in interface ControlrequestMore in class Action<E,O>n - the number of elements to requestprotected void requestUpstream(long capacity,
boolean terminated,
long elements)
requestUpstream in class Action<E,O>public final reactor.core.Dispatcher getDispatcher()
StreamgetDispatcher in class Stream<O>protected FanInSubscription<I,E,O,SUBSCRIBER> createFanInSubscription()
public FanInSubscription<I,E,O,SUBSCRIBER> getSubscription()
ActiongetSubscription in class Action<E,O>Subscriptionprotected abstract FanInAction.InnerSubscriber<I,E,O> createSubscriber()