@Override
  public int size() {
    lock.lock();
    try {
      return list.size();
    } finally {
      lock.unlock();
    }
  }
Returns the number of elements in this deque.

@return the number of elements in this deque
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/PriorityBlockingDeque.java