docs: public int claimRecord(final int key)
      {
          int offset = endOfPositionField;
  
          while (offset < position())
          {
              if (key == key(offset))
              {
                  // If someone else is writing something with the same key then abort
                  if (statusVolatile(offset) == PENDING)
                  {
                      return DID_NOT_CLAIM_RECORD;
                  }
                  else // state == COMMITTED
                  {
                      compareAndSetStatus(offset, COMMITTED, PENDING);
                      return offset + SIZE_OF_RECORD_FRAME;
                  }
              }
  
              offset += slotSize;
          }
  
          if ((offset + slotSize) > buffer.capacity())
          {
              return DID_NOT_CLAIM_RECORD;
          }
  
          final int claimOffset = movePosition(slotSize);
          compareAndSetStatus(claimOffset, UNUSED, PENDING);
          key(claimOffset, key);
  
          return claimOffset + SIZE_OF_RECORD_FRAME;
      }