@Override
  public E take() throws InterruptedException {
    E x;
    int c = -1;
    final AtomicInteger count = this.count;
    final ReentrantLock takeLock = this.takeLock;
    takeLock.lockInterruptibly();
    try {
      while (count.get() == 0) {
        notEmpty.await();
      }
      x = dequeue();
      c = count.getAndDecrement();
      if (c > 1) {
        notEmpty.signal();
      }
    } finally {
      takeLock.unlock();
    }
    if (c == capacity) {
      signalNotFull();
    }
    return x;
  }
Inserts the specified element at the tail of this queue if it is possible to do so immediately
without exceeding the queue's capacity, returning {@code true} upon success and {@code false}
if this queue is full. When using a capacity-restricted queue, this method is generally
preferable to method {@link BlockingQueue#add add}, which can fail to insert an element only by
throwing an exception.

@throws NullPointerException if the specified element is null
geode-core/src/main/java/org/apache/geode/internal/cache/ForceableLinkedBlockingQueue.java