public synchronized long incRefLastCommitGen() throws IOException {
  long nextGen=saveLoadState.getNextWriteGen();
  if (nextGen == 0) {
    throw new IllegalStateException("no commit exists");
  }
  long result=nextGen - 1;
  incRef(result);
  return result;
}

public synchronized long incRefLastCommitGen ( ) throws IOException { long nextGen = saveLoadState . getNextWriteGen ( ) ; if ( nextGen == 0 ) { throw new IllegalStateException ( "no commit exists" ) ; } long result = nextGen - 1 ; incRef ( result ) ; return result ; }
record that this snapshot id refers to the current generation , returning it .
