Top Description Fields Constructors Methods
io.reactivex.rxjava3.processors

pack-priv final Class SerializedProcessor<T>

extends FlowableProcessor<T>
Class Inheritance
Type Parameters
<T>
the item value type
Imports
org.reactivestreams.*, io.reactivex.rxjava3.annotations.Nullable, io.reactivex.rxjava3.internal.util.*, io.reactivex.rxjava3.plugins.RxJavaPlugins

Serializes calls to the Subscriber methods.

All other Publisher and Subject methods are thread-safe by design.

Field Summary

Modifier and TypeField and Description
pack-priv final FlowableProcessor<T>
actual

The actual subscriber to serialize Subscriber calls to.

pack-priv volatile boolean
done

Indicates a terminal event has been received and all further events will be dropped.

pack-priv boolean
emitting

Indicates an emission is going on, guarded by this.

pack-priv AppendOnlyLinkedArrayList<Object>
queue

If not null, it holds the missed NotificationLite events.

Constructor Summary

AccessConstructor and Description
pack-priv
SerializedProcessor(final FlowableProcessor<T>
the subject wrapped
actual
)

Constructor that wraps an actual subject.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
emitLoop()

Loops until all notifications in the queue has been processed.

public @Nullable Throwable
getThrowable()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.getThrowable.

Returns the error that caused the FlowableProcessor to terminate or null if the FlowableProcessor hasn't terminated yet.
public boolean
hasComplete()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.hasComplete.

Returns true if the FlowableProcessor has reached a terminal state through a complete event.
public boolean
hasSubscribers()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.hasSubscribers.

Returns true if the FlowableProcessor has subscribers.
public boolean
hasThrowable()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.hasThrowable.

Returns true if the FlowableProcessor has reached a terminal state through an error event.
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

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

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
protected void
Inherited from io.reactivex.rxjava3.processors.FlowableProcessor:
toSerialized

Field Detail

actualback to summary
pack-priv final FlowableProcessor<T> actual

The actual subscriber to serialize Subscriber calls to.

doneback to summary
pack-priv volatile boolean done

Indicates a terminal event has been received and all further events will be dropped.

emittingback to summary
pack-priv boolean emitting

Indicates an emission is going on, guarded by this.

queueback to summary
pack-priv AppendOnlyLinkedArrayList<Object> queue

If not null, it holds the missed NotificationLite events.

Constructor Detail

SerializedProcessorback to summary
pack-priv SerializedProcessor(final FlowableProcessor<T> actual)

Constructor that wraps an actual subject.

Parameters
actual:FlowableProcessor<T>

the subject wrapped

Method Detail

emitLoopback to summary
pack-priv void emitLoop()

Loops until all notifications in the queue has been processed.

getThrowableback to summary
public @Nullable Throwable getThrowable()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.getThrowable.

Doc from io.reactivex.rxjava3.processors.FlowableProcessor.getThrowable.

Returns the error that caused the FlowableProcessor to terminate or null if the FlowableProcessor hasn't terminated yet.

The method is thread-safe.

Returns:@Nullable Throwable

the error that caused the FlowableProcessor to terminate or null if the FlowableProcessor hasn't terminated yet

Annotations
@Override
@Nullable
hasCompleteback to summary
public boolean hasComplete()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.hasComplete.

Doc from io.reactivex.rxjava3.processors.FlowableProcessor.hasComplete.

Returns true if the FlowableProcessor has reached a terminal state through a complete event.

The method is thread-safe.

Returns:boolean

true if the FlowableProcessor has reached a terminal state through a complete event

Annotations
@Override
hasSubscribersback to summary
public boolean hasSubscribers()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.hasSubscribers.

Doc from io.reactivex.rxjava3.processors.FlowableProcessor.hasSubscribers.

Returns true if the FlowableProcessor has subscribers.

The method is thread-safe.

Returns:boolean

true if the FlowableProcessor has subscribers

Annotations
@Override
hasThrowableback to summary
public boolean hasThrowable()

Implements abstract io.reactivex.rxjava3.processors.FlowableProcessor.hasThrowable.

Doc from io.reactivex.rxjava3.processors.FlowableProcessor.hasThrowable.

Returns true if the FlowableProcessor has reached a terminal state through an error event.

The method is thread-safe.

Returns:boolean

true if the FlowableProcessor has reached a terminal state through an error event

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
t:T

the element signaled

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Subscription s)

Implements org.reactivestreams.Subscriber.onSubscribe.

Doc from org.reactivestreams.Subscriber.onSubscribe.

Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
s:Subscription

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override
subscribeActualback to summary
protected void subscribeActual(Subscriber<? super T> s)
Annotations
@Override