public ScheduledFuture<?> schedule(Runnable runnable, long delay, TimeUnit unit) {
    synchronized (this) {
      if (future == null || future.isCancelled() || future.isDone()
          || future.getDelay(unit) > delay) {
        if (future != null && !future.isDone()) {
          future.cancel(false);
          listener.taskDropped();
        }
        future = ex.schedule(new DelegatingRunnable(runnable), delay, unit);
      } else {
        listener.taskDropped();
      }
    }
    return future;
  }
Schedule an execution of a task. This will either add the task to the execution service, or if
a task has already been scheduled through this decorator and is still pending execution it will
return the future associated with the previously scheduled task.

@param runnable a runnable to execution
@param delay the time to delay before execution
@param unit the time unit
@return The future associated with this task, or with a previously scheduled task if that task
        has not yet been run.
@see ScheduledExecutorService#schedule(Runnable, long, TimeUnit)
geode-core/src/main/java/org/apache/geode/internal/OneTaskOnlyExecutor.java