Package com.orientechnologies.orient.core.storage

Examples of com.orientechnologies.orient.core.storage.OPhysicalPosition


  /**
   * Change the PhysicalPosition of the logical record iPosition.
   */
  public void setPhysicalPosition(final long iPosition, final int iDataId, final long iDataPosition, final byte iRecordType) {
    Long key = new Long(iPosition);
    final OPhysicalPosition ppos = map.get(key);
    ppos.dataSegment = iDataId;
    ppos.dataPosition = iDataPosition;
    ppos.type = iRecordType;
    map.put(key, ppos);
  }
View Full Code Here


    map.put(key, ppos);
  }

  public void updateRecordType(final long iPosition, final byte iRecordType) throws IOException {
    final Long key = new Long(iPosition);
    final OPhysicalPosition ppos = map.get(key);
    ppos.type = iRecordType;
    map.put(key, ppos);
  }
View Full Code Here

    map.put(key, ppos);
  }

  public void updateVersion(long iPosition, final int iVersion) throws IOException {
    final Long key = new Long(iPosition);
    final OPhysicalPosition ppos = map.get(key);
    ppos.version = iVersion;
    map.put(key, ppos);
  }
View Full Code Here

    map.put(key, ppos);
  }

  public void truncate() throws IOException {
    map.clear();
    total = new OPhysicalPosition(0, -1, (byte) 0);
    map.put(new Long(-1), total);
    map.save();
  }
View Full Code Here

   *
   * @throws IOException
   */
  public long addPhysicalPosition(final int iDataSegmentId, final long iRecordPosition, final byte iRecordType) throws IOException {
    final long pos = ++total.dataPosition;
    map.put(new Long(pos), new OPhysicalPosition(iDataSegmentId, iRecordPosition, iRecordType));

    map.put(new Long(-1), total);
    return pos;
  }
View Full Code Here

        if (iRid.clusterPosition > lastPos)
          throw new ORecordNotFoundException("Record " + iRid + " is out cluster size. Valid range for cluster '"
              + iClusterSegment.getName() + "' is 0-" + lastPos);

        final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());
        if (ppos == null || !checkForRecordValidity(ppos))
          // DELETED
          return null;

        final ODataLocal data = getDataSegment(ppos.dataSegment);
View Full Code Here

    lock.acquireExclusiveLock();

    try {
      lockManager.acquireLock(Thread.currentThread(), iRid, LOCK.EXCLUSIVE);
      try {
        final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());
        if (!checkForRecordValidity(ppos))
          // DELETED
          return -1;

        // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
View Full Code Here

    try {

      lockManager.acquireLock(Thread.currentThread(), iRid, LOCK.EXCLUSIVE);
      try {

        final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());

        if (!checkForRecordValidity(ppos))
          // ALREADY DELETED
          return false;
View Full Code Here

        if (iRid.clusterPosition > lastPos)
          throw new ORecordNotFoundException("Record " + iRid + " is out cluster size. Valid range for cluster '"
              + iClusterSegment.getName() + "' is 0-" + lastPos);

        final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());
        if (ppos == null || !checkForRecordValidity(ppos))
          // DELETED
          return null;

        final ODataLocal data = getDataSegment(ppos.dataSegment);
View Full Code Here

    lock.acquireExclusiveLock();

    try {
      lockManager.acquireLock(Thread.currentThread(), iRid, LOCK.EXCLUSIVE);
      try {
        final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());
        if (!checkForRecordValidity(ppos))
          // DELETED
          return -1;

        // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.storage.OPhysicalPosition

Copyright © 2018 www.massapicom. 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.