public synchronized Segment nextSegment ( ) throws IOException { Segment seg = nextSegment ( false ) ; // Remove the writer segment index buffer file. File sibFile = getSegmentIndexBufferFile ( seg . getSegmentId ( ) ) ; if ( sibFile . exists ( ) ) { sibFile . delete ( ) ; } return seg ; }
Opens the next segment available for read and write .