public long getFirstIndex() {
    lock.readLock().lock();
    try {
      return firstIndex;
    } finally {
      lock.readLock().unlock();
    }
  }
Clear the queue. All elements will be removed. All iterators will be closed.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/ConcurrentIterableLinkedQueue.java