code: public void clear() {
          final ReentrantLock lock = this.lock;
          lock.lock();
          try {
              Object[] array = queue;
              int n = size;
              size = 0;
              for (int i = 0; i < n; i++)
                  array[i] = null;
          } finally {
              lock.unlock();
          }
      }
docs: Atomically removes all of the elements from this queue.
  The queue will be empty after this call returns.