public synchronized void scheduleAfterDebounceTime(String actionName, long delayInMillis, Runnable runnable) {
    if (!isShuttingDown) {
      // 1. Try to cancel any existing scheduled task associated with the action.
      tryCancelScheduledAction(actionName);

      // 2. Schedule the action.
      ScheduledFuture scheduledFuture =
          scheduledExecutorService.schedule(getScheduleableAction(actionName, runnable), delayInMillis, TimeUnit.MILLISECONDS);

      LOG.info("Scheduled action: {} to run after: {} milliseconds.", actionName, delayInMillis);
      futureHandles.put(actionName, scheduledFuture);
    } else {
      LOG.info("Scheduler is stopped. Not scheduling action: {} to run.", actionName);
    }
  }
Performs the following operations in sequential order.
<ul>
   <li> Makes best effort to cancel any existing task in task queue associated with the action.</li>
   <li> Schedules the incoming action for later execution and records its future.</li>
</ul>

@param actionName the name of scheduleable action.
@param delayInMillis the time from now to delay execution.
@param runnable the action to execute.
samza-core/src/main/java/org/apache/samza/zk/ScheduleAfterDebounceTime.java