@Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
      if (executor.isShutdown()) {
        throw new RejectedExecutionException("executor has been shutdown");
      }
      try {
        PooledExecutorWithDMStats pool = (PooledExecutorWithDMStats) executor;
        pool.blockingWorkQueue.put(r);
      } catch (InterruptedException ie) {
        Thread.currentThread().interrupt();
        throw new RejectedExecutionException("interrupted", ie);
      }
    }
This handler fronts a synchronous queue, that is owned by the parent ThreadPoolExecutor, with a
the
client supplied BlockingQueue that supports storage (the buffer queue). A dedicated thread is
used to consume off the buffer queue and put into the synchronous queue.
geode-core/src/main/java/org/apache/geode/distributed/internal/PooledExecutorWithDMStats.java