@Override public long handleCommit(final long commitTime){
  if (error != null)   throw new IndexInconsistentError(error);
  final IRootBlockView view=journal.getRootBlockView();
  final ByteBuffer rbv=view.asReadOnlyBuffer();
  final ByteBuffer bb=ByteBuffer.allocate(rbv.capacity());
  for (int i=0; i < rbv.capacity(); i++) {
    bb.put(rbv.get());
  }
  bb.flip();
  return journal.write(bb);
}

@ Override public long handleCommit ( final long commitTime ) { if ( error != null ) throw new IndexInconsistentError ( error ) ; final IRootBlockView view = journal . getRootBlockView ( ) ; final ByteBuffer rbv = view . asReadOnlyBuffer ( ) ; final ByteBuffer bb = ByteBuffer . allocate ( rbv . capacity ( ) ) ; for ( int i = 0 ; i < rbv . capacity ( ) ; i ++ ) { bb . put ( rbv . get ( ) ) ; } bb . flip ( ) ; return journal . write ( bb ) ; }
write the current root block to the journal and return its address to be stored in the commitrecord .
