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 TypeMethodDescriptionboolean
Deprecated.Indicate that aonComplete()
should be delivered afterdeliverDeferredTerminal()
is later called.boolean
deferredOnError
(Throwable cause) Deprecated.Indicate that aonError(Throwable)
should be delivered afterdeliverDeferredTerminal()
is later called.void
Deprecated.Try to deliver a terminal signal typically set bydeferredOnComplete()
ordeferredOnError(Throwable)
.void
Deprecated.Callback to signal completion of thePublisherSource
for thisSubscriber
.void
Deprecated.Callback to receive anerror
for thisSubscriber
.void
Deprecated.Callback to receive adata
element for thisSubscriber
.void
onSubscribe
(PublisherSource.Subscription subscription) Deprecated.Callback to receive aPublisherSource.Subscription
for thisSubscriber
.boolean
Deprecated.Attempt to processonComplete()
.boolean
Deprecated.Attempt to processonError(Throwable)
.
-
Constructor Details
-
ConcurrentTerminalSubscriber
Deprecated.Create a new instance.- Parameters:
delegate
- ThePublisherSource.Subscriber
to delegate all signals to.
-
ConcurrentTerminalSubscriber
public ConcurrentTerminalSubscriber(PublisherSource.Subscriber<T> delegate, boolean concurrentOnSubscribe) Deprecated.Create a new instance.- Parameters:
delegate
- ThePublisherSource.Subscriber
to delegate all signals to.concurrentOnSubscribe
-false
to not guard for concurrency onPublisherSource.Subscriber.onSubscribe(PublisherSource.Subscription)
.true
means thatPublisherSource.Subscriber.onSubscribe(PublisherSource.Subscription)
will be protected against concurrent invocation with terminal methods.
-
-
Method Details
-
onSubscribe
Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to receive aPublisherSource.Subscription
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onSubscribe
in interfacePublisherSource.Subscriber<T>
- Parameters:
subscription
-PublisherSource.Subscription
for thisSubscriber
.
-
onNext
Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to receive adata
element for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onNext
in interfacePublisherSource.Subscriber<T>
- Parameters:
t
- Adata
element.
-
onError
Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to receive anerror
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onError
in interfacePublisherSource.Subscriber<T>
- Parameters:
t
-error
for thisSubscriber
.
-
processOnError
Deprecated.Attempt to processonError(Throwable)
.- Parameters:
t
- The error to process.- Returns:
true
if the terminal signal was propagated to the delegatePublisherSource.Subscriber
.
-
onComplete
public void onComplete()Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to signal completion of thePublisherSource
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onComplete
in interfacePublisherSource.Subscriber<T>
-
processOnComplete
public boolean processOnComplete()Deprecated.Attempt to processonComplete()
.- Returns:
true
if 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:
true
if the terminal signal was "queued" to be delivered anddeliverDeferredTerminal()
MUST subsequently be called.false
if 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:
true
if the terminal signalcause
was "queued" to be delivered anddeliverDeferredTerminal()
MUST subsequently be called.false
if 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)
.
-