public synchronized void clear() {
    head = 0;
    size = 0;
  }
A queue that supports random access and consumption.
@param <T> Element type
samza-sql-shell/src/main/java/org/apache/samza/sql/client/util/RandomAccessQueue.java