public SegmentKelp createSegment ( int length , byte [ ] tableKey , long sequence ) { SegmentMeta segmentMeta = findSegmentMeta ( length ) ; SegmentKelp segment ; SegmentExtent extent = segmentMeta . allocate ( ) ; if ( extent == null ) { extent = allocateSegment ( segmentMeta ) ; } segment = new SegmentKelp ( extent , sequence , tableKey , this ) ; segment . writing ( ) ; segmentMeta . addLoaded ( segment ) ; return segment ; }
Create a new writing sequence with the given sequence id .