public long updateLongField(int fileId,
                              int fieldOffsetInRow,
                              @NotNull LongUnaryOperator updateOperator) throws IOException {
    long offsetInFile = toOffsetInFile(fileId) + fieldOffsetInRow;
    int offsetInPage = storage.toOffsetInPage(offsetInFile);

    Page page = storage.pageByOffset(offsetInFile);
    ByteBuffer rawPageBuffer = page.rawPageBuffer();
    while (true) {//CAS loop:
      long currentValue = (long)LONG_HANDLE.getVolatile(rawPageBuffer, offsetInPage);
      long newValue = updateOperator.applyAsLong(currentValue);
      if (LONG_HANDLE.compareAndSet(rawPageBuffer, offsetInPage, currentValue, newValue)) {
        return currentValue;
      }
    }
  }
public long updateLongField(int fileId,
                              int fieldOffsetInRow,
                              @NotNull LongUnaryOperator updateOperator)