public @NotNull OwnershipInfo tryAcquireExclusiveAccess(int acquiringProcessId,
                                                          long acquiringTimestampMs,
                                                          boolean forcibly) throws IOException {
    if (acquiringProcessId == NULL_OWNER_PID) {
      throw new IllegalArgumentException("acquiringPid(=" + acquiringProcessId + ") must be !=0");
    }
    ByteBuffer headerPageBuffer = headerPage().rawPageBuffer();
    while (true) {//CAS loop
      int currentOwnerProcessId = (int)INT_HANDLE.getVolatile(headerPageBuffer, FileHeader.OWNER_PROCESS_ID_OFFSET);
      if (currentOwnerProcessId == acquiringProcessId) {
        //already acquired => nothing to do
        owningProcessId = acquiringProcessId;
        long ownershipAcquiredMs = (long)LONG_HANDLE.getVolatile(headerPageBuffer, FileHeader.OWNERSHIP_ACQUIRED_TIMESTAMP_OFFSET);
        return new OwnershipInfo(acquiringProcessId, ownershipAcquiredMs);
      }
      if (currentOwnerProcessId != NULL_OWNER_PID && !forcibly) {
        //already acquired by other process => return owner's pid as an indication of failure
        long ownershipAcquiredMs = (long)LONG_HANDLE.getVolatile(headerPageBuffer, FileHeader.OWNERSHIP_ACQUIRED_TIMESTAMP_OFFSET);
        return new OwnershipInfo(currentOwnerProcessId, ownershipAcquiredMs);
      }
      if (INT_HANDLE.compareAndSet(headerPageBuffer, FileHeader.OWNER_PROCESS_ID_OFFSET, currentOwnerProcessId, acquiringProcessId)) {
        owningProcessId = acquiringProcessId;
        LONG_HANDLE.setVolatile(headerPageBuffer, FileHeader.OWNERSHIP_ACQUIRED_TIMESTAMP_OFFSET, acquiringTimestampMs);
        storage.fsync();//ensure status is persisted
        return new OwnershipInfo(acquiringProcessId, acquiringTimestampMs);
      }
    }
  }
public @NotNull OwnershipInfo tryAcquireExclusiveAccess(int acquiringProcessId,
                                                          long acquiringTimestampMs,
                                                          boolean forcibly)