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>

static final class ObservableReplay.InnerDisposable<T> extends AtomicInteger implements Disposable
A Disposable that manages the disposed state of a child Observer in thread-safe manner.
  • 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

      final Observer<? super T> child
      The actual child subscriber.
    • index

      Object index
      Holds an object that represents the current location in the buffer. Guarded by the emitter loop.
    • cancelled

      volatile boolean cancelled
  • Constructor Details

  • 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
    • 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