@Override
  public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException {
    if (Thread.interrupted()) {
      throw new InterruptedException();
    }
    preAddInterruptibly(e);
    boolean didOp = false;
    try {
      if (super.offer(e, timeout, unit)) {
        didOp = true;
        stats.add();
        return true;
      } else {
        return false;
      }
    } finally {
      if (!didOp) {
        postRemove(e);
      }
    }
  }
Creates new OverflowQueueWithDMStats with a maximum capacity.
geode-core/src/main/java/org/apache/geode/distributed/internal/OverflowQueueWithDMStats.java