Class ObservablePublish.InnerDisposable<T>
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<ObservablePublish.PublishConnection<T>>
-
- io.reactivex.rxjava3.internal.operators.observable.ObservablePublish.InnerDisposable<T>
-
- Type Parameters:
T
- the element type
- All Implemented Interfaces:
Disposable
,java.io.Serializable
- Enclosing class:
- ObservablePublish<T>
static final class ObservablePublish.InnerDisposable<T> extends java.util.concurrent.atomic.AtomicReference<ObservablePublish.PublishConnection<T>> implements Disposable
Intercepts the dispose signal from the downstream and removes itself from the connection's observers array at most once.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Observer<? super T>
downstream
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description InnerDisposable(Observer<? super T> downstream, ObservablePublish.PublishConnection<T> parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Dispose the resource, the operation should be idempotent.boolean
isDisposed()
Returns true if this resource has been disposed.-
Methods inherited from class java.util.concurrent.atomic.AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InnerDisposable
InnerDisposable(Observer<? super T> downstream, ObservablePublish.PublishConnection<T> parent)
-
-
Method Detail
-
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
-
-