Class ObservableReplay.InnerDisposable<T>
java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.operators.observable.ObservableReplay.InnerDisposable<T>
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
Disposable
,Serializable
- Enclosing class:
ObservableReplay<T>
A Disposable that manages the disposed state of a
child Observer in thread-safe manner.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
The actual child subscriber.(package private) Object
Holds an object that represents the current location in the buffer.(package private) final ObservableReplay.ReplayObserver
<T> The parent subscriber-to-source used to allow removing the child in case of child dispose() call.private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionInnerDisposable
(ObservableReplay.ReplayObserver<T> parent, Observer<? super T> child) -
Method Summary
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:
-
parent
The parent subscriber-to-source used to allow removing the child in case of child dispose() call. -
child
The actual child subscriber. -
index
Object indexHolds an object that represents the current location in the buffer. Guarded by the emitter loop. -
cancelled
volatile boolean cancelled
-
-
Constructor Details
-
InnerDisposable
InnerDisposable(ObservableReplay.ReplayObserver<T> parent, Observer<? super T> child)
-
-
Method Details
-
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
-
dispose
public void dispose()Description copied from interface:Disposable
Dispose the resource, the operation should be idempotent.- Specified by:
dispose
in interfaceDisposable
-
index
<U> U index()Convenience method to auto-cast the index object.- Type Parameters:
U
- type index to be casted to- Returns:
- the index Object or null
-