private int reserveFreeRecord() throws IOException {
    ensureFreeRecordsScanned();
    synchronized (myFreeRecordsList) {
      return myFreeRecordsList.isEmpty() ? -1 : myFreeRecordsList.removeInt(myFreeRecordsList.size() - 1);
    }
  }
private int reserveFreeRecord()