badKeyReaderService.shutdown();
badKeyReaderService.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
logger.info("Bad key reader service has shutdown.");
consistencyFixWorkers.shutdown();
consistencyFixWorkers.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
logger.info("All workers have shutdown.");
// Poison the bad key writer to have it exit.
badKeyQOut.put(new BadKeyStatus());
badKeyWriterService.shutdown();