private Segment currentSegment ( ) { Segment segment = segments . currentSegment ( ) ; if ( segment . isFull ( ) ) { segments . currentSegment ( ) . flush ( ) ; segment = segments . nextSegment ( ) ; } return segment ; }
Checks whether we need to roll over to a new segment .