private boolean innerAdd(E e) {
    if (list.size() >= capacity)
      return false;

    int insertionPoint = Collections.binarySearch(list, e, comparator);
    if (insertionPoint < 0) {
      // this means the key didn't exist, so the insertion point is negative minus 1.
      insertionPoint = -insertionPoint - 1;
    }

    list.add(insertionPoint, e);
    // Inserted in sort order. Hence no explict sort.
    notEmpty.signal();

    return true;
  }
Adds e or returns false if full.

@param e The element to add.
@return Whether adding was successful.
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/PriorityBlockingDeque.java