Class BasicIntQueueDisposable<T>

java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.observers.BasicIntQueueDisposable<T>
Type Parameters:
T - the output value type
All Implemented Interfaces:
Disposable, QueueDisposable<T>, QueueFuseable<T>, SimpleQueue<T>, Serializable
Direct Known Subclasses:
DeferredScalarDisposable, MaybeFlattenStreamAsObservable.FlattenStreamMultiObserver, ObservableDoFinally.DoFinallyObserver, ObservableFlatMapCompletable.FlatMapCompletableMainObserver, ObservableObserveOn.ObserveOnObserver, ObservableRange.RangeDisposable, ObservableRangeLong.RangeDisposable, SingleFlatMapIterableObservable.FlatMapIterableObserver, UnicastSubject.UnicastQueueDisposable

public abstract class BasicIntQueueDisposable<T> extends AtomicInteger implements QueueDisposable<T>
An abstract QueueDisposable implementation, extending an AtomicInteger, that defaults all unnecessary Queue methods to throw UnsupportedOperationException.
See Also:
  • Field Details

  • Constructor Details

    • BasicIntQueueDisposable

      public BasicIntQueueDisposable()
  • Method Details

    • offer

      public final boolean offer(T e)
      Description copied from interface: SimpleQueue
      Atomically enqueue a single value.
      Specified by:
      offer in interface SimpleQueue<T>
      Parameters:
      e - the value to enqueue, not null
      Returns:
      true if successful, false if the value was not enqueued likely due to reaching the queue capacity)
    • offer

      public final boolean offer(T v1, T v2)
      Description copied from interface: SimpleQueue
      Atomically enqueue two values.
      Specified by:
      offer in interface SimpleQueue<T>
      Parameters:
      v1 - the first value to enqueue, not null
      v2 - the second value to enqueue, not null
      Returns:
      true if successful, false if the value was not enqueued likely due to reaching the queue capacity)