Class FutureDisposable

java.lang.Object
java.util.concurrent.atomic.AtomicReference<Future<?>>
io.reactivex.rxjava3.disposables.FutureDisposable
All Implemented Interfaces:
Disposable, Serializable

final class FutureDisposable extends AtomicReference<Future<?>> implements Disposable
A Disposable container that cancels a Future instance.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • allowInterrupt

      private final boolean allowInterrupt
  • Constructor Details

    • FutureDisposable

      FutureDisposable(Future<?> run, boolean allowInterrupt)
  • Method Details

    • isDisposed

      public boolean isDisposed()
      Description copied from interface: Disposable
      Returns true if this resource has been disposed.
      Specified by:
      isDisposed in interface Disposable
      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 interface Disposable