Class MaybeDelay.DelayMaybeObserver<T>

java.lang.Object
java.util.concurrent.atomic.AtomicReference<Disposable>
io.reactivex.rxjava3.internal.operators.maybe.MaybeDelay.DelayMaybeObserver<T>
All Implemented Interfaces:
MaybeObserver<T>, Disposable, Serializable, Runnable
Enclosing class:
MaybeDelay<T>

static final class MaybeDelay.DelayMaybeObserver<T> extends AtomicReference<Disposable> implements MaybeObserver<T>, Disposable, Runnable
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • downstream

      final MaybeObserver<? super T> downstream
    • delay

      final long delay
    • unit

      final TimeUnit unit
    • scheduler

      final Scheduler scheduler
    • delayError

      final boolean delayError
    • value

      T value
    • error

      Throwable error
  • Constructor Details

  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • dispose

      public void dispose()
      Description copied from interface: Disposable
      Dispose the resource, the operation should be idempotent.
      Specified by:
      dispose in interface Disposable
    • 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
    • onSubscribe

      public void onSubscribe(Disposable d)
      Description copied from interface: MaybeObserver
      Provides the MaybeObserver with the means of cancelling (disposing) the connection (channel) with the Maybe in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.
      Specified by:
      onSubscribe in interface MaybeObserver<T>
      Parameters:
      d - the Disposable instance whose Disposable.dispose() can be called anytime to cancel the connection
    • onSuccess

      public void onSuccess(T value)
      Description copied from interface: MaybeObserver
      Notifies the MaybeObserver with one item and that the Maybe has finished sending push-based notifications.

      The Maybe will not call this method if it calls MaybeObserver.onError(Throwable).

      Specified by:
      onSuccess in interface MaybeObserver<T>
      Parameters:
      value - the item emitted by the Maybe
    • onError

      public void onError(Throwable e)
      Description copied from interface: MaybeObserver
      Notifies the MaybeObserver that the Maybe has experienced an error condition.

      If the Maybe calls this method, it will not thereafter call MaybeObserver.onSuccess(T).

      Specified by:
      onError in interface MaybeObserver<T>
      Parameters:
      e - the exception encountered by the Maybe
    • onComplete

      public void onComplete()
      Description copied from interface: MaybeObserver
      Called once the deferred computation completes normally.
      Specified by:
      onComplete in interface MaybeObserver<T>
    • schedule

      void schedule(long delay)