Package com.orientechnologies.orient.core.storage

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


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

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

        if (ppos == null)
          return null;

        return new ORawBuffer(data.readRecord(ppos.dataPosition), ppos.version, ppos.type);
View Full Code Here


    try {

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

        final OPhysicalPosition ppos = cluster.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());
        if (ppos == null)
          return -1;

        // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
        if (iVersion > -1 && ppos.version != iVersion)
View Full Code Here

    try {

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

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

        if (ppos == null)
          return false;

        // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
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

    acquireExclusiveLock();
    try {

      if (removed.size() > 0) {
        final int recycledPosition = removed.remove(removed.size() - 1);
        entries.set(recycledPosition, new OPhysicalPosition(iDataSegmentId, iRecordPosition, iRecordType));
        return recycledPosition;
      } else {
        entries.add(new OPhysicalPosition(iDataSegmentId, iRecordPosition, iRecordType));
        return entries.size() - 1;
      }

    } finally {
      releaseExclusiveLock();
View Full Code Here

  public void setPhysicalPosition(final long iPosition, final long iDataPosition) {
    acquireExclusiveLock();
    try {

      final OPhysicalPosition ppos = entries.get((int) iPosition);
      ppos.dataPosition = iDataPosition;

    } finally {
      releaseExclusiveLock();
    }
View Full Code Here

  public void setPhysicalPosition(final long iPosition, final int iDataId, final long iDataPosition, final byte iRecordType) {
    acquireExclusiveLock();
    try {

      final OPhysicalPosition ppos = entries.get((int) iPosition);
      ppos.dataSegment = iDataId;
      ppos.dataPosition = iDataPosition;
      ppos.type = iRecordType;

    } finally {
View Full Code Here

  }

  protected void deleteRecord(final int iTxId, final OCluster iClusterSegment, final long iPosition, final int iVersion) {
    try {
      // GET THE PPOS OF THE RECORD
      final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iPosition, new OPhysicalPosition());

      if (!storage.checkForRecordValidity(ppos))
        // ALREADY DELETED
        return;
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.