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

pack-priv abstract Class ReferenceDisposable<T>

extends AtomicReference<T>
implements Disposable
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.disposables.Disposable
Known Direct Subclasses
io.reactivex.rxjava3.disposables.RunnableDisposable, io.reactivex.rxjava3.disposables.SubscriptionDisposable, io.reactivex.rxjava3.disposables.ActionDisposable, io.reactivex.rxjava3.disposables.AutoCloseableDisposable
Type Parameters
<T>
the type contained
Imports
java.util.Objects, java.util.concurrent.atomic.AtomicReference, io.reactivex.rxjava3.annotations.NonNull

Base class for Disposable containers that manage some other type that has to be run when the container is disposed.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public final void
dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
public final boolean
isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
protected abstract void
onDisposed(T value)

Inherited from java.util.concurrent.atomic.AtomicReference:
accumulateAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetgetgetAcquiregetAndAccumulategetAndSetgetAndUpdategetOpaquegetPlainlazySetsetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicReference.serialVersionUID.

Constructor Detail

ReferenceDisposableback to summary
pack-priv ReferenceDisposable(T value)

Method Detail

disposeback to summary
public final void dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Doc from io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
isDisposedback to summary
public final boolean isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Doc from io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been disposed

Annotations
@Override
onDisposedback to summary
protected abstract void onDisposed(T value)