void completed(InetAddress remote, String cfname) {
   logger.debug("Repair completed for {} on {}", remote, cfname);
   RepairJob job = activeJobs.get(cfname);
   if (job.completedSynchronizationJob(remote)) {
     activeJobs.remove(cfname);
     if (activeJobs.isEmpty()) completed.signalAll();
   }
 }
 void failedNode(InetAddress remote) {
   String errorMsg =
       String.format("Problem during repair session %s, endpoint %s died", sessionName, remote);
   logger.error(errorMsg);
   exception = new IOException(errorMsg);
   // If a node failed, we stop everything (though there could still be some activity in the
   // background)
   jobs.clear();
   activeJobs.clear();
   differencingDone.signalAll();
   completed.signalAll();
 }
    void completed(Differencer differencer) {
      logger.debug(
          String.format(
              "[repair #%s] Repair completed between %s and %s on %s",
              getName(), differencer.r1.endpoint, differencer.r2.endpoint, differencer.cfname));
      RepairJob job = activeJobs.get(differencer.cfname);
      if (job == null) {
        assert terminated;
        return;
      }

      if (job.completedSynchronization(differencer)) {
        activeJobs.remove(differencer.cfname);
        String remaining =
            activeJobs.size() == 0
                ? ""
                : String.format(
                    " (%d remaining column family to sync for this session)", activeJobs.size());
        logger.info(
            String.format(
                "[repair #%s] %s is fully synced%s", getName(), differencer.cfname, remaining));
        if (activeJobs.isEmpty()) completed.signalAll();
      }
    }
 /** clear all RepairJobs and terminate this session. */
 public void forceShutdown() {
   differencingDone.signalAll();
   completed.signalAll();
 }