private void rescheduleChore(ScheduledChore chore, boolean immediately) {
    if (scheduledChores.containsKey(chore)) {
      ScheduledFuture<?> future = scheduledChores.get(chore);
      future.cancel(false);
    }
    // set initial delay to 0 as we want to run it immediately
    ScheduledFuture<?> future = scheduler.scheduleAtFixedRate(chore,
      immediately ? 0 : chore.getPeriod(), chore.getPeriod(), chore.getTimeUnit());
    scheduledChores.put(chore, future);
  }
@param chore The Chore to be rescheduled. If the chore is not scheduled with this ChoreService
             yet then this call is equivalent to a call to scheduleChore.
hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java