public int createNextRecord() throws IOException {
    return withWriteLock(() -> {
      LocalHistoryRecordsTable table = (LocalHistoryRecordsTable)myRecordsTable;
      int id = table.createNewRecord();
      int prev = table.getLastRecord();

      if (prev > 0) {
        table.setPrevRecord(id, prev);
        table.setNextRecord(prev, id);
      }
      else {
        table.setFirstRecord(id);
      }
      table.setLastRecord(id);

      table.setTimestamp(id, Clock.getTime());

      return id;
    });
  }
public int createNextRecord()