Class FlowablePublish.PublishConnection<T>
java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.operators.flowable.FlowablePublish.PublishConnection<T>
- All Implemented Interfaces:
FlowableSubscriber<T>
,Disposable
,Serializable
,org.reactivestreams.Subscriber<T>
- Enclosing class:
FlowablePublish<T>
static final class FlowablePublish.PublishConnection<T>
extends AtomicInteger
implements FlowableSubscriber<T>, Disposable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int
(package private) final AtomicBoolean
(package private) int
(package private) final AtomicReference
<FlowablePublish.PublishConnection<T>> (package private) boolean
(package private) static final FlowablePublish.InnerSubscription[]
(package private) Throwable
(package private) SimpleQueue
<T> private static final long
(package private) int
(package private) final AtomicReference
<FlowablePublish.InnerSubscription<T>[]> (package private) static final FlowablePublish.InnerSubscription[]
(package private) final AtomicReference
<org.reactivestreams.Subscription> -
Constructor Summary
ConstructorsConstructorDescriptionPublishConnection
(AtomicReference<FlowablePublish.PublishConnection<T>> current, int bufferSize) -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
add
(FlowablePublish.InnerSubscription<T> inner) (package private) boolean
checkTerminated
(boolean isDone, boolean isEmpty) void
dispose()
Dispose the resource, the operation should be idempotent.(package private) void
drain()
boolean
Returns true if this resource has been disposed.void
void
void
void
onSubscribe
(org.reactivestreams.Subscription s) Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)
is established before callingSubscription.request(long)
.(package private) void
remove
(FlowablePublish.InnerSubscription<T> inner) (package private) void
signalError
(Throwable ex) Methods inherited from class java.util.concurrent.atomic.AtomicInteger
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
current
-
upstream
-
connect
-
subscribers
-
bufferSize
final int bufferSize -
queue
-
sourceMode
int sourceMode -
done
volatile boolean done -
error
Throwable error -
consumed
int consumed -
EMPTY
-
TERMINATED
-
-
Constructor Details
-
PublishConnection
PublishConnection(AtomicReference<FlowablePublish.PublishConnection<T>> current, int bufferSize)
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:Disposable
Dispose the resource, the operation should be idempotent.- Specified by:
dispose
in interfaceDisposable
-
isDisposed
public boolean isDisposed()Description copied from interface:Disposable
Returns true if this resource has been disposed.- Specified by:
isDisposed
in interfaceDisposable
- Returns:
- true if this resource has been disposed
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s) Description copied from interface:FlowableSubscriber
Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)
is established before callingSubscription.request(long)
. In practice this means no initialization should happen after therequest()
call and additional behavior is thread safe in respect toonNext
.- Specified by:
onSubscribe
in interfaceFlowableSubscriber<T>
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<T>
-
onNext
- Specified by:
onNext
in interfaceorg.reactivestreams.Subscriber<T>
-
onError
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<T>
-
drain
void drain() -
checkTerminated
boolean checkTerminated(boolean isDone, boolean isEmpty) -
signalError
-
add
-
remove
-