public synchronized E poll() throws InterruptedException {
    while (isEmpty()) {
      this.wait();
    }
    E output = pollFirst();
    size--;
    reservedSize++;
    return output;
  }
Get and remove the first element of the queue. Reserve space for this polled element.

@return the queue head element.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/IndexedBlockingReserveQueue.java