/** * Stops CL, for testing purposes. DO NOT USE THIS OUTSIDE OF TESTS. * Only call this after the AbstractCommitLogService is shut down. */ public void stopUnsafe(boolean deleteSegments) { logger.debug("CLSM closing and clearing existing commit log segments..."); shutdown(); try { awaitTermination(); } catch (InterruptedException e) { throw new RuntimeException(e); } for (CommitLogSegment segment : activeSegments) closeAndDeleteSegmentUnsafe(segment, deleteSegments); activeSegments.clear(); size.set(0L); logger.trace("CLSM done with closing and clearing existing commit log segments."); }
/** * Stops CL, for testing purposes. DO NOT USE THIS OUTSIDE OF TESTS. * Only call this after the AbstractCommitLogService is shut down. */ public void stopUnsafe(boolean deleteSegments) { logger.debug("CLSM closing and clearing existing commit log segments..."); shutdown(); try { awaitTermination(); } catch (InterruptedException e) { throw new RuntimeException(e); } for (CommitLogSegment segment : activeSegments) closeAndDeleteSegmentUnsafe(segment, deleteSegments); activeSegments.clear(); size.set(0L); logger.trace("CLSM done with closing and clearing existing commit log segments."); }
/** * Stops CL, for testing purposes. DO NOT USE THIS OUTSIDE OF TESTS. * Only call this after the AbstractCommitLogService is shut down. */ public void stopUnsafe(boolean deleteSegments) { logger.debug("CLSM closing and clearing existing commit log segments..."); shutdown(); try { awaitTermination(); } catch (InterruptedException e) { throw new RuntimeException(e); } for (CommitLogSegment segment : activeSegments) closeAndDeleteSegmentUnsafe(segment, deleteSegments); activeSegments.clear(); size.set(0L); logger.trace("CLSM done with closing and clearing existing commit log segments."); }
/** * Shuts down the threads used by the commit log, blocking until completion. */ public void shutdownBlocking() throws InterruptedException { executor.shutdown(); executor.awaitTermination(); segmentManager.shutdown(); segmentManager.awaitTermination(); }
/** * Shuts down the threads used by the commit log, blocking until completion. */ public void shutdownBlocking() throws InterruptedException { executor.shutdown(); executor.awaitTermination(); segmentManager.shutdown(); segmentManager.awaitTermination(); }
/** * Shuts down the threads used by the commit log, blocking until completion. */ public void shutdownBlocking() throws InterruptedException { executor.shutdown(); executor.awaitTermination(); segmentManager.shutdown(); segmentManager.awaitTermination(); }