Class ObservableWindowTimed.AbstractWindowObserver<T>

java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.operators.observable.ObservableWindowTimed.AbstractWindowObserver<T>
All Implemented Interfaces:
Observer<T>, Disposable, Serializable
Direct Known Subclasses:
ObservableWindowTimed.WindowExactBoundedObserver, ObservableWindowTimed.WindowExactUnboundedObserver, ObservableWindowTimed.WindowSkipObserver
Enclosing class:
ObservableWindowTimed<T>

abstract static class ObservableWindowTimed.AbstractWindowObserver<T> extends AtomicInteger implements Observer<T>, Disposable
  • Field Details

  • Constructor Details

    • AbstractWindowObserver

      AbstractWindowObserver(Observer<? super Observable<T>> downstream, long timespan, TimeUnit unit, int bufferSize)
  • Method Details

    • onSubscribe

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

      abstract void createFirstWindow()
    • onNext

      public final void onNext(T t)
      Description copied from interface: Observer
      Provides the Observer with a new item to observe.

      The Observable may call this method 0 or more times.

      The Observable will not call this method again after it calls either Observer.onComplete() or Observer.onError(java.lang.Throwable).

      Specified by:
      onNext in interface Observer<T>
      Parameters:
      t - the item emitted by the Observable
    • onError

      public final void onError(Throwable t)
      Description copied from interface: Observer
      Notifies the Observer that the Observable has experienced an error condition.

      If the Observable calls this method, it will not thereafter call Observer.onNext(T) or Observer.onComplete().

      Specified by:
      onError in interface Observer<T>
      Parameters:
      t - the exception encountered by the Observable
    • onComplete

      public final void onComplete()
      Description copied from interface: Observer
      Notifies the Observer that the Observable has finished sending push-based notifications.

      The Observable will not call this method if it calls Observer.onError(java.lang.Throwable).

      Specified by:
      onComplete in interface Observer<T>
    • dispose

      public final void dispose()
      Description copied from interface: Disposable
      Dispose the resource, the operation should be idempotent.
      Specified by:
      dispose in interface Disposable
    • isDisposed

      public final 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
    • windowDone

      final void windowDone()
    • cleanupResources

      abstract void cleanupResources()
    • drain

      abstract void drain()