public boolean offerFirst(E e, long timeout, TimeUnit unit)
      throws InterruptedException {
    if (e == null) throw new NullPointerException();
    long nanos = unit.toNanos(timeout);
    lock.lockInterruptibly();
    try {
      for (; ;) {
        if (innerAdd(e))
          return true;
        if (nanos <= 0)
          return false;
        nanos = notFull.awaitNanos(nanos);
      }
    } finally {
      lock.unlock();
    }
  }
@throws NullPointerException {@inheritDoc}
@throws InterruptedException {@inheritDoc}
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/PriorityBlockingDeque.java