public void stop() { CountDownLatch stopped = t.stopped; t.done = true; try { stopped.await(); } catch (InterruptedException e) { log.error("Problem waiting for CheckpointManager to stop", e); t.interrupt(); } }