Package com.orientechnologies.orient.core.storage.fs

Examples of com.orientechnologies.orient.core.storage.fs.OFile.writeShort()


  protected void writeRecord(final long[] iFilePosition, final int iClusterSegment, final long iClusterPosition,
      final byte[] iContent) throws IOException {
    final OFile file = files[(int) iFilePosition[0]];

    file.writeInt(iFilePosition[1], iContent.length);
    file.writeShort(iFilePosition[1] + OConstants.SIZE_INT, (short) iClusterSegment);
    file.writeLong(iFilePosition[1] + OConstants.SIZE_INT + OConstants.SIZE_SHORT, iClusterPosition);

    file.write(iFilePosition[1] + RECORD_FIX_SIZE, iContent);
  }
View Full Code Here


      final long[] pos = getRelativePosition(iPosition);

      final OFile file = files[(int) pos[0]];
      long p = pos[1];

      file.writeShort(p, (short) iDataId);
      file.writeLong(p += OConstants.SIZE_SHORT, iDataPosition);
      file.writeByte(p += OConstants.SIZE_LONG, iRecordType);

    } finally {
      releaseExclusiveLock();
View Full Code Here

      }

      OFile file = files[(int) pos[0]];
      long p = pos[1];

      file.writeShort(p, (short) iDataSegmentId);
      file.writeLong(p += OConstants.SIZE_SHORT, iPosition);
      file.writeByte(p += OConstants.SIZE_LONG, iRecordType);
      file.writeInt(p += OConstants.SIZE_BYTE, 0);

      final long returnedPosition = offset / RECORD_SIZE;
View Full Code Here

      final long[] pos = getRelativePosition(iPosition);

      final OFile file = files[(int) pos[0]];
      long p = pos[1];

      file.writeShort(p, (short) iDataId);
      file.writeLong(p += OConstants.SIZE_SHORT, iDataPosition);
      file.writeByte(p += OConstants.SIZE_LONG, iRecordType);

    } finally {
      releaseSharedLock();
View Full Code Here

      }

      OFile file = files[(int) pos[0]];
      long p = pos[1];

      file.writeShort(p, (short) iDataSegmentId);
      file.writeLong(p += OConstants.SIZE_SHORT, iPosition);
      file.writeByte(p += OConstants.SIZE_LONG, iRecordType);
      file.writeInt(p += OConstants.SIZE_BYTE, 0);

      final long returnedPosition = offset / RECORD_SIZE;
View Full Code Here

  protected void writeRecord(final long[] iFilePosition, final int iClusterSegment, final long iClusterPosition,
      final byte[] iContent) throws IOException {
    final OFile file = files[(int) iFilePosition[0]];

    file.writeInt(iFilePosition[1], iContent.length);
    file.writeShort(iFilePosition[1] + OConstants.SIZE_INT, (short) iClusterSegment);
    file.writeLong(iFilePosition[1] + OConstants.SIZE_INT + OConstants.SIZE_SHORT, iClusterPosition);

    file.write(iFilePosition[1] + RECORD_FIX_SIZE, iContent);
  }
View Full Code Here

      final long[] pos = getRelativePosition(iPosition);

      final OFile file = files[(int) pos[0]];
      long p = pos[1];

      file.writeShort(p, (short) iDataId);
      file.writeLong(p += OConstants.SIZE_SHORT, iDataPosition);
      file.writeByte(p += OConstants.SIZE_LONG, iRecordType);

    } finally {
      releaseExclusiveLock();
View Full Code Here

      }

      OFile file = files[(int) pos[0]];
      long p = pos[1];

      file.writeShort(p, (short) iDataSegmentId);
      file.writeLong(p += OConstants.SIZE_SHORT, iPosition);
      file.writeByte(p += OConstants.SIZE_LONG, iRecordType);
      file.writeInt(p += OConstants.SIZE_BYTE, 0);

      final long returnedPosition = offset / RECORD_SIZE;
View Full Code Here

  protected void writeRecord(final long[] iFilePosition, final int iClusterSegment, final long iClusterPosition,
      final byte[] iContent) throws IOException {
    final OFile file = files[(int) iFilePosition[0]];

    file.writeInt(iFilePosition[1], iContent.length);
    file.writeShort(iFilePosition[1] + OConstants.SIZE_INT, (short) iClusterSegment);
    file.writeLong(iFilePosition[1] + OConstants.SIZE_INT + OConstants.SIZE_SHORT, iClusterPosition);

    file.write(iFilePosition[1] + RECORD_FIX_SIZE, iContent);
  }
View Full Code Here

      final long[] pos = getRelativePosition(iPosition);

      final OFile file = files[(int) pos[0]];
      long p = pos[1];

      file.writeShort(p, (short) iDataId);
      file.writeLong(p += OConstants.SIZE_SHORT, iDataPosition);
      file.writeByte(p += OConstants.SIZE_LONG, iRecordType);

    } finally {
      releaseExclusiveLock();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.