question: public void insertRecord ( int id , byte [ ] record ) throws IOException { if ( ! database . isOpen ( ) ) throw new IllegalStateException ( "don't access the table before opening the database" ) ; if ( id < committedNextRowId ) { throw new IllegalStateException ( "Trying to insert a row below nextRowId: " + id + ", this: " + this ) ; } if ( id != lastTransactionInsertId + 1 ) { throw new IllegalStateException ( "Trying to insert a row that is not one above the last transaction id: " + lastTransactionInsertId + ", id: " + id ) ; } if ( record . length != recordSize ) { throw new IllegalStateException ( "Record is wrong size: " + record . length + ", this: " + this ) ; } synchronized ( this ) { rwRaf . seek ( HEADER_SIZE + recordSize * id ) ; rwRaf . write ( record ) ; } lastTransactionInsertId = id ; }
target:  Within a transaction, all inserts must be done in sequential order. They may be done during any commit stage, hard or soft (note, the option to write during hard mode is needed by PropertyTimmyTable.writeProperties())