public T takeMax() throws InterruptedException {
    final ReentrantLock lock = this.lock;
    lock.lockInterruptibly();
    try {
      while (queue.isEmpty()) {
        notEmpty.await();
      }
      return queue.pollLast();
    } finally {
      this.lock.unlock();
    }
  }
Return the element with max priority. If the queue is empty, the thread will be blocked util
there are some elements inserted into the queue.

@return
@throws InterruptedException
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/FixedPriorityBlockingQueue.java