Class ChunkedQueue<E>

java.lang.Object
qilin.util.queue.ChunkedQueue<E>

public class ChunkedQueue<E> extends Object
A queue of Object's. One can add objects to the queue, and they are later read by a QueueReader. One can create arbitrary numbers of QueueReader's for a queue, and each one receives all the Object's that are added. Only objects that have not been read by all the QueueReader's are kept. A QueueReader only receives the Object's added to the queue after the QueueReader was created.
Author:
Ondrej Lhotak
  • Field Details

    • NULL_CONST

      protected static final Object NULL_CONST
    • DELETED_CONST

      protected static final Object DELETED_CONST
    • LENGTH

      protected static final int LENGTH
      See Also:
    • q

      protected Object[] q
    • index

      protected int index
  • Constructor Details

    • ChunkedQueue

      public ChunkedQueue()
  • Method Details

    • add

      public void add(E o)
      Add an object to the queue.
    • reader

      public QueueReader<E> reader()
      Create reader which will read objects from the queue.
    • toString

      public String toString()
      Overrides:
      toString in class Object