Interface SimplePlainQueue<T>

Type Parameters:
T - the value type to offer and poll, not null
All Superinterfaces:
SimpleQueue<T>
All Known Implementing Classes:
SpscArrayQueue, SpscLinkedArrayQueue

public interface SimplePlainQueue<@NonNull T> extends SimpleQueue<T>
Override of the SimpleQueue interface with no throws Throwable on poll().
Since:
3.1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    Tries to dequeue a value (non-null) or returns null if the queue is empty.

    Methods inherited from interface SimpleQueue

    clear, isEmpty, offer, offer
    Modifier and Type
    Method
    Description
    void
    Removes all enqueued items from this queue.
    boolean
    Returns true if the queue is empty.
    boolean
    offer(@NonNull T value)
    Atomically enqueue a single value.
    boolean
    Atomically enqueue two values.
  • Method Details

    • poll

      @Nullable T poll()
      Description copied from interface: SimpleQueue
      Tries to dequeue a value (non-null) or returns null if the queue is empty.

      If the producer uses SimpleQueue.offer(Object, Object) and when polling in pairs, if the first poll() returns a non-null item, the second poll() is guaranteed to return a non-null item as well.

      Specified by:
      poll in interface SimpleQueue<T>
      Returns:
      the item or null to indicate an empty queue