public void cancel() {
    if (currentTask != null) {
      currentTask.cancel();
    }
    isRunning = false;
    logger.info("Timer cancelled");
  }
Cancels the timer.
If the timer is not running, it does nothing.
ambry-utils/src/main/java/com/github/ambry/utils/ExtendableTimer.java