public void resetUnsafe ( ) { logger . debug ( "Closing and clearing existing commit log segments..." ) ; while ( ! segmentManagementTasks . isEmpty ( ) ) Thread . yield ( ) ; for ( CommitLogSegment segment : activeSegments ) segment . close ( ) ; activeSegments . clear ( ) ; for ( CommitLogSegment segment : availableSegments ) segment . close ( ) ; availableSegments . clear ( ) ; allocatingFrom = null ; }
Resets all the segments for testing purposes . DO NOT USE THIS OUTSIDE OF TESTS .