public void forEach ( final RecordHandler handler ) { int offset = endOfPositionField ; final int position = position ( ) ; while ( offset < position ) { if ( statusVolatile ( offset ) == COMMITTED ) { final int key = key ( offset ) ; handler . onRecord ( key , offset + SIZE_OF_RECORD_FRAME ) ; } offset += slotSize ; } }
Read each record out of the buffer in turn .