/** FOR TESTING PURPOSES. See CommitLogAllocator. */
 public void stopUnsafe(boolean deleteSegments) {
   executor.shutdown();
   try {
     executor.awaitTermination();
   } catch (InterruptedException e) {
     throw new RuntimeException(e);
   }
   allocator.stopUnsafe(deleteSegments);
 }
 /** Shuts down the threads used by the commit log, blocking until completion. */
 public void shutdownBlocking() throws InterruptedException {
   executor.shutdown();
   executor.awaitTermination();
   allocator.shutdown();
   allocator.awaitTermination();
 }