hu.akarnokd.rxjava2.util

## Class SpscOneQueue<T>

- java.lang.Object
- - java.util.concurrent.atomic.AtomicReference<T>
  - - hu.akarnokd.rxjava2.util.SpscOneQueue<T>

Type Parameters:
  `T` - the value type

All Implemented Interfaces:
  io.reactivex.internal.fuseable.SimplePlainQueue<T>, io.reactivex.internal.fuseable.SimpleQueue<T>, java.io.Serializable

    public final class SpscOneQueue<T>
    extends java.util.concurrent.atomic.AtomicReference<T>
    implements io.reactivex.internal.fuseable.SimplePlainQueue<T>

A single-producer single-consumer queue with exactly one slot of value.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`SpscOneQueue()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()`
`boolean` `isEmpty()`
`boolean` `offer(T value)`
`boolean` `offer(T v1, T v2)`
`T` `poll()`

### Methods inherited from class java.util.concurrent.atomic.AtomicReference

`accumulateAndGet, compareAndSet, get, getAndAccumulate, getAndSet, getAndUpdate, lazySet, set, toString, updateAndGet, weakCompareAndSet`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SpscOneQueue

    public SpscOneQueue()

### Method Detail

#### offer

    public boolean offer(T value)

Specified by:
  `offer` in interface `io.reactivex.internal.fuseable.SimpleQueue<T>`

#### offer

    public boolean offer(T v1,
                         T v2)

Specified by:
  `offer` in interface `io.reactivex.internal.fuseable.SimpleQueue<T>`

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `io.reactivex.internal.fuseable.SimpleQueue<T>`

#### clear

    public void clear()

Specified by:
  `clear` in interface `io.reactivex.internal.fuseable.SimpleQueue<T>`

#### poll

    public T poll()

Specified by:
  `poll` in interface `io.reactivex.internal.fuseable.SimplePlainQueue<T>`
Specified by:
  `poll` in interface `io.reactivex.internal.fuseable.SimpleQueue<T>`