Top Description Inners Fields Constructors Methods
reactor.core.publisher

pack-priv final Class SinkManyReplayProcessor<T>

extends Flux<T>
implements InternalManySink<T>, CoreSubscriber<T>, ContextHolder, Disposable, Fuseable, Scannable
Class Inheritance
All Implemented Interfaces
reactor.core.Scannable, reactor.core.Fuseable, reactor.core.Disposable, reactor.core.publisher.ContextHolder, reactor.core.CoreSubscriber, org.reactivestreams.Subscriber, reactor.core.publisher.InternalManySink, reactor.core.publisher.Sinks.Many
Type Parameters
<T>
the value type
Imports
java.time.Duration, java.util.Objects, java.util.concurrent.CancellationException, java.util.concurrent.atomic.AtomicIntegerFieldUpdater, .AtomicLongFieldUpdater, .AtomicReferenceFieldUpdater, java.util.stream.Stream, org.reactivestreams.Subscriber, .Subscription, reactor.core.CoreSubscriber, .Disposable, .Fuseable, .Scannable, reactor.core.publisher.Sinks.EmitResult, reactor.core.scheduler.Scheduler, .Schedulers, reactor.util.annotation.Nullable, reactor.util.concurrent.Queues, reactor.util.context.Context

Replays all or the last N items to Subscribers.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final FluxReplay.ReplayBuffer<T>
pack-priv volatile FluxReplay.ReplaySubscription<T>[]
pack-priv static final AtomicReferenceFieldUpdater<SinkManyReplayProcessor<T>, FluxReplay.ReplaySubscription<T>[]>
pack-priv Subscription
Inherited from reactor.core.publisher.Flux:
ALWAYS_BOOLEAN_SUPPLIERIDENTITY_FUNCTIONLIST_SUPPLIEROBJECT_EQUALSET_SUPPLIERTUPLE2_BIFUNCTION

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
public Flux<T>
asFlux()

Implements reactor.core.publisher.Sinks.Many.asFlux.

Return a Flux view of this sink.
pack-priv static <
the type of the pushed elements
T
>
SinkManyReplayProcessor<T>

Returns:

a new SinkManyReplayProcessor that replays its last pushed element to each new Subscriber
cacheLast
()

Create a SinkManyReplayProcessor that caches the last element it has pushed, replaying it to late subscribers.

pack-priv static <
the type of the pushed elements
T
>
SinkManyReplayProcessor<T>

Returns:

a new SinkManyReplayProcessor that replays its last pushed element to each new Subscriber, or a default one if nothing was pushed yet
cacheLastOrDefault
(T
a default value to start the sequence with in case nothing has been cached yet.
value
)

Create a SinkManyReplayProcessor that caches the last element it has pushed, replaying it to late subscribers.

pack-priv static <
the type of the pushed elements
E
>
SinkManyReplayProcessor<E>

Returns:

a new SinkManyReplayProcessor that replays the whole history to each new Subscriber.
create
()

Create a new SinkManyReplayProcessor that replays an unbounded number of elements, using a default internal Queue.

pack-priv static <
the type of the pushed elements
E
>
SinkManyReplayProcessor<E>

Returns:

a new SinkManyReplayProcessor that replays a limited history to each new Subscriber.
create
(int
the backlog size, ie. maximum items retained for replay.
historySize
)

Create a new SinkManyReplayProcessor that replays up to historySize elements.

pack-priv static <
the type of the pushed elements
E
>
SinkManyReplayProcessor<E>

Returns:

a new SinkManyReplayProcessor that replays the whole history to each new Subscriber if configured as unbounded, a limited history otherwise.
create
(int
maximum items retained if bounded, or initial link size if unbounded
historySize
,
boolean
true if "unlimited" data store must be supplied
unbounded
)

Create a new SinkManyReplayProcessor that either replay all the elements or a limited amount of elements depending on the unbounded parameter.

pack-priv static <
the type of items observed and emitted by the sink
T
>
SinkManyReplayProcessor<T>

Returns:

a new SinkManyReplayProcessor that replay up to size elements, but will evict them from its history based on their age.
createSizeAndTimeout
(int
the maximum number of buffered items
size
,
Duration
the maximum age of the contained items
maxAge
)

Creates a time- and size-bounded replay processor.

pack-priv static <
the type of items observed and emitted by the sink
T
>
SinkManyReplayProcessor<T>

Returns:

a new SinkManyReplayProcessor that replay up to size elements, but will evict them from its history based on their age.
createSizeAndTimeout
(int
the maximum number of buffered items
size
,
Duration
the maximum age of the contained items in milliseconds
maxAge
,
Scheduler
the Scheduler that provides the current time
scheduler
)

Creates a time- and size-bounded replay processor.

pack-priv static <
the type of items observed and emitted by the sink
T
>
SinkManyReplayProcessor<T>

Returns:

a new SinkManyReplayProcessor that replays elements based on their age.
createTimeout
(Duration
the maximum age of the contained items
maxAge
)

Creates a time-bounded replay processor.

pack-priv static <
the type of items observed and emitted by the sink
T
>
SinkManyReplayProcessor<T>

Returns:

a new SinkManyReplayProcessor that replays elements based on their age.
createTimeout
(Duration
the maximum age of the contained items
maxAge
,
Scheduler scheduler)

Creates a time-bounded replay processor.

public Context
currentContext()

Overrides default reactor.core.CoreSubscriber.currentContext.

Implements reactor.core.publisher.ContextHolder.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.
public int
currentSubscriberCount()

Implements reactor.core.publisher.Sinks.Many.currentSubscriberCount.

Get how many Subscribers are currently subscribed to the sink.
public void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
public int
getPrefetch()

Overrides reactor.core.publisher.Flux.getPrefetch.

The prefetch configuration of the Flux
public Stream<? extends Scannable>
inners()

Overrides default reactor.core.Scannable.inners.

Return a Stream of referenced inners (flatmap, multicast etc)
public boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public void
onError(Throwable
the throwable signaled
throwable
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public void
onNext(T
the element signaled
t
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
s
)

Implements reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
pack-priv void
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public void
subscribe(CoreSubscriber<? super T>
the Subscriber interested into the published sequence
actual
)

Implements abstract reactor.core.publisher.Flux.subscribe.

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
public Sinks.EmitResult
tryEmitComplete()

Implements reactor.core.publisher.Sinks.Many.tryEmitComplete.

Try to terminate the sequence successfully, generating an onComplete signal.
public Sinks.EmitResult
tryEmitError(Throwable
the exception to signal, not null
t
)

Implements reactor.core.publisher.Sinks.Many.tryEmitError.

Try to fail the sequence, generating an onError signal.
public Sinks.EmitResult
tryEmitNext(T
the value to emit, not null
t
)

Implements reactor.core.publisher.Sinks.Many.tryEmitNext.

Try emitting a non-null element, generating an onNext signal.
Inherited from reactor.core.publisher.Flux:
allanyasblockFirstblockFirstblockLastblockLastbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferTimeoutbufferUntilbufferUntilbufferUntilChangedbufferUntilChangedbufferUntilChangedbufferWhenbufferWhenbufferWhilecachecachecachecachecachecachecancelOncastcheckpointcheckpointcheckpointcollectcollectcollectListcollectMapcollectMapcollectMapcollectMultimapcollectMultimapcollectMultimapcollectSortedListcollectSortedListcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestconcatconcatconcatconcatconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatMapconcatMapconcatMapDelayErrorconcatMapDelayErrorconcatMapDelayErrorconcatMapIterableconcatMapIterableconcatWithconcatWithValuescontextCapturecontextWritecontextWritecountcountingBooleanSuppliercountingPredicatecreatecreatedefaultIfEmptydeferdeferContextualdelayElementsdelayElementsdelaySequencedelaySequencedelaySubscriptiondelaySubscriptiondelaySubscriptiondelayUntildematerializedistinctdistinctdistinctdistinctdistinctUntilChangeddistinctUntilChangeddistinctUntilChangeddoAfterTerminatedoFinallydoFirstdoOnCanceldoOnCompletedoOnDiscarddoOnEachdoOnErrordoOnErrordoOnErrordoOnNextdoOnRequestdoOnSignaldoOnSubscribedoOnTerminateelapsedelapsedelementAtelementAtemptyequalPredicateerrorerrorerrorexpandexpandexpandDeepexpandDeepfilterfilterWhenfilterWhenfirstfirstfirstWithSignalfirstWithSignalfirstWithValuefirstWithValueflatMapflatMapflatMapflatMapflatMapflatMapDelayErrorflatMapIterableflatMapIterableflatMapSequentialflatMapSequentialflatMapSequentialflatMapSequentialflatMapSequentialDelayErrorfromfromArrayfromIterablefromStreamfromStreamgenerategenerategenerategroupBygroupBygroupBygroupBygroupJoinhandlehasElementhasElementshashSetSupplierhideidentityFunctionignoreElementsindexindexintervalintervalintervalintervaljoinjustjustlastlastlimitRatelimitRatelimitRequestlistSupplierloglogloglogloglogmapmapNotNullmaterializemergemergemergemergemergemergemergemergeComparingmergeComparingmergeComparingmergeComparingDelayErrormergeComparingWithmergeDelayErrormergeOrderedmergeOrderedmergeOrderedmergeOrderedWithmergePrioritymergePrioritymergePrioritymergePriorityDelayErrormergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialmergeSequentialDelayErrormergeSequentialDelayErrormergeSequentialDelayErrormergeWithmetricsnamenevernextofTypeonAssemblyonAssemblyonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureDroponBackpressureDroponBackpressureErroronBackpressureLatestonErrorCompleteonErrorCompleteonErrorCompleteonErrorContinueonErrorContinueonErrorContinueonErrorMaponErrorMaponErrorMaponErrorResumeonErrorResumeonErrorResumeonErrorReturnonErrorReturnonErrorReturnonErrorStoponTerminateDetachorparallelparallelparallelpublishpublishpublishpublishpublishNextpublishOnpublishOnpublishOnpublishOnpushpushrangereducereducereduceWithrepeatrepeatrepeatrepeatrepeatWhenreplayreplayreplayreplayreplayreplayretryretryretryWhensamplesamplesampleFirstsampleFirstsampleTimeoutsampleTimeoutscanscanscanWithshareshareNextsinglesinglesingleOrEmptyskipskipskipskipLastskipUntilskipUntilOtherskipWhilesortsortstartWithstartWithstartWithsubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribeOnsubscribeOnsubscribeWithswitchIfEmptyswitchMapswitchMapswitchOnFirstswitchOnFirstswitchOnNextswitchOnNexttagtaketaketaketaketakeLasttakeUntiltakeUntilOthertakeWhiletaptaptapthenthenthenEmptythenManytimedtimedtimeouttimeouttimeouttimeouttimeouttimeouttimeouttimestamptimestamptoIterabletoIterabletoIterabletoStreamtoStreamtoStringtransformtransformDeferredtransformDeferredContextualtuple2FunctionusingusingusingWhenusingWhenwindowwindowwindowwindowwindowwindowwindowwindowTimeoutwindowTimeoutwindowTimeoutwindowTimeoutwindowUntilwindowUntilwindowUntilwindowUntilChangedwindowUntilChangedwindowUntilChangedwindowWhenwindowWhilewindowWhilewithLatestFromwrapwrapToMonozipzipzipzipzipzipzipzipzipzipzipzipzipzipWithzipWithzipWithzipWithzipWithIterablezipWithIterable