code: public void clear() {
          fullyLock();
          try {
              for (Node<E> p, h = head; (p = h.next) != null; h = p) {
                  h.next = sentinel();
                  p.item = null;
              }
              head = last;
              // assert head.item == null && head.next == null;
              if (count.getAndSet(0) == capacity)
                  notFull.signal();
          } finally {
              fullyUnlock();
          }
      }
docs: Atomically removes all of the elements from this queue.
  The queue will be empty after this call returns.