Class ConcurrentTerminalSubscriber<T>
java.lang.Object
io.servicetalk.concurrent.internal.ConcurrentTerminalSubscriber<T>
- Type Parameters:
T- The type ofPublisherSource.Subscriber.
- All Implemented Interfaces:
PublisherSource.Subscriber<T>
@Deprecated
public final class ConcurrentTerminalSubscriber<T>
extends Object
implements PublisherSource.Subscriber<T>
Deprecated.
This internal class will be removed in the future releases without a replacement. If you depend on it,
consider copying into your codebase.
A
PublisherSource.Subscriber that allows for concurrent delivery of terminal events.-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Create a new instance.ConcurrentTerminalSubscriber(PublisherSource.Subscriber<T> delegate, boolean concurrentOnSubscribe) Deprecated.Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Indicate that aonComplete()should be delivered afterdeliverDeferredTerminal()is later called.booleandeferredOnError(Throwable cause) Deprecated.Indicate that aonError(Throwable)should be delivered afterdeliverDeferredTerminal()is later called.voidDeprecated.Try to deliver a terminal signal typically set bydeferredOnComplete()ordeferredOnError(Throwable).voidDeprecated.Callback to signal completion of thePublisherSourcefor thisSubscriber.voidDeprecated.Callback to receive anerrorfor thisSubscriber.voidDeprecated.Callback to receive adataelement for thisSubscriber.voidonSubscribe(PublisherSource.Subscription subscription) Deprecated.Callback to receive aPublisherSource.Subscriptionfor thisSubscriber.booleanDeprecated.Attempt to processonComplete().booleanDeprecated.Attempt to processonError(Throwable).
-
Constructor Details
-
ConcurrentTerminalSubscriber
Deprecated.Create a new instance.- Parameters:
delegate- ThePublisherSource.Subscriberto delegate all signals to.
-
ConcurrentTerminalSubscriber
public ConcurrentTerminalSubscriber(PublisherSource.Subscriber<T> delegate, boolean concurrentOnSubscribe) Deprecated.Create a new instance.- Parameters:
delegate- ThePublisherSource.Subscriberto delegate all signals to.concurrentOnSubscribe-falseto not guard for concurrency onPublisherSource.Subscriber.onSubscribe(PublisherSource.Subscription).truemeans thatPublisherSource.Subscriber.onSubscribe(PublisherSource.Subscription)will be protected against concurrent invocation with terminal methods.
-
-
Method Details
-
onSubscribe
Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to receive aPublisherSource.Subscriptionfor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onSubscribein interfacePublisherSource.Subscriber<T>- Parameters:
subscription-PublisherSource.Subscriptionfor thisSubscriber.
-
onNext
Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to receive adataelement for thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onNextin interfacePublisherSource.Subscriber<T>- Parameters:
t- Adataelement.
-
onError
Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to receive anerrorfor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onErrorin interfacePublisherSource.Subscriber<T>- Parameters:
t-errorfor thisSubscriber.
-
processOnError
Deprecated.Attempt to processonError(Throwable).- Parameters:
t- The error to process.- Returns:
trueif the terminal signal was propagated to the delegatePublisherSource.Subscriber.
-
onComplete
public void onComplete()Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to signal completion of thePublisherSourcefor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onCompletein interfacePublisherSource.Subscriber<T>
-
processOnComplete
public boolean processOnComplete()Deprecated.Attempt to processonComplete().- Returns:
trueif the terminal signal was propagated to the delegatePublisherSource.Subscriber.
-
deferredOnComplete
public boolean deferredOnComplete()Deprecated.Indicate that aonComplete()should be delivered afterdeliverDeferredTerminal()is later called.deliverDeferredTerminal()MUST be subsequently called or the terminal signal may never be delivered. This signal may also be delivered ifonNext(Object)is being concurrently invoked.- Returns:
trueif the terminal signal was "queued" to be delivered anddeliverDeferredTerminal()MUST subsequently be called.falseif another thread is concurrently terminating thisPublisherSource.Subscriber(this terminal signal may still be delivered).- See Also:
-
deferredOnError
Deprecated.Indicate that aonError(Throwable)should be delivered afterdeliverDeferredTerminal()is later called.deliverDeferredTerminal()MUST be subsequently called or the terminal signal may never be delivered. This signal may also be delivered ifonNext(Object)is being concurrently invoked.- Parameters:
cause- The terminal error signal to be delivered later (either whendeliverDeferredTerminal()is called or ifonNext(Object)is being concurrently invoked).- Returns:
trueif the terminal signalcausewas "queued" to be delivered anddeliverDeferredTerminal()MUST subsequently be called.falseif another thread is concurrently terminating thisPublisherSource.Subscriber(this terminal signal may still be delivered).- See Also:
-
deliverDeferredTerminal
public void deliverDeferredTerminal()Deprecated.Try to deliver a terminal signal typically set bydeferredOnComplete()ordeferredOnError(Throwable).
-