code: public void addPhysicalPosition(final OPhysicalPosition iPPosition) throws IOException {
      final long[] pos;
      final boolean recycled;
      long offset;
  
      acquireExclusiveLock();
      try {
  
        offset = holeSegment.popLastEntryPosition();
        if (offset > -1) {
          // REUSE THE HOLE
          pos = fileSegment.getRelativePosition(offset);
          recycled = true;
        } else {
          // NO HOLES FOUND: ALLOCATE MORE SPACE
          pos = allocateRecord();
          offset = fileSegment.getAbsolutePosition(pos);
          recycled = false;
        }
  
        final OFile file = fileSegment.files[(int) pos[0]];
        long p = pos[1];
  
        file.writeShort(p, (short) iPPosition.dataSegmentId);
        file.writeLong(p += OBinaryProtocol.SIZE_SHORT, iPPosition.dataSegmentPos);
        file.writeByte(p += OBinaryProtocol.SIZE_LONG, iPPosition.recordType);
  
        if (recycled)
          // GET LAST VERSION
          iPPosition.recordVersion = file.readInt(p + OBinaryProtocol.SIZE_BYTE) * -1;
        else
          iPPosition.recordVersion = 0;
  
        file.writeInt(p + OBinaryProtocol.SIZE_BYTE, iPPosition.recordVersion);
  
        iPPosition.clusterPosition = offset / RECORD_SIZE;
  
        updateBoundsAfterInsertion(iPPosition.clusterPosition);
  
      } finally {
        releaseExclusiveLock();
      }
    }
docs: Adds a new entry.
  
  @throws IOException