Examples of OConcurrentModificationException


Examples of com.orientechnologies.orient.core.exception.OConcurrentModificationException

        if (ppos == null)
          return false;

        // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
        if (iVersion > -1 && ppos.version != iVersion)
          throw new OConcurrentModificationException(
              "Can't delete record "
                  + iRid
                  + " because the version is not the latest one. Probably you are deleting an old record or it has been modified by another user (db=v"
                  + ppos.version + " your=v" + iVersion + ")");
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OConcurrentModificationException

  protected void checkVersions(final ORecordId rid, final ORecordVersion iRecordVersion, final ORecordVersion iDatabaseVersion) {
    if (OFastConcurrentModificationException.enabled())
      throw OFastConcurrentModificationException.instance();
    else
      throw new OConcurrentModificationException(rid, iDatabaseVersion, iRecordVersion, ORecordOperation.UPDATED);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OConcurrentModificationException

      iDocument.reload();
      if (version.getCounter() > -1 && iDocument.getRecordVersion().compareTo(version) != 0) // check for record version errors
        if (OFastConcurrentModificationException.enabled())
          throw OFastConcurrentModificationException.instance();
        else
          throw new OConcurrentModificationException(iDocument.getIdentity(), iDocument.getRecordVersion(), version,
              ORecordOperation.DELETED);
    }

    return RESULT.RECORD_NOT_CHANGED;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OConcurrentModificationException

            // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
            if (version.getCounter() > -1 && !ppos.recordVersion.equals(version))
              if (OFastConcurrentModificationException.enabled())
                throw OFastConcurrentModificationException.instance();
              else
                throw new OConcurrentModificationException(rid, ppos.recordVersion, version, ORecordOperation.DELETED);

            makeStorageDirty();
            atomicOperationsManager.startAtomicOperation();
            try {
              final ORecordSerializationContext context = ORecordSerializationContext.getContext();
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OConcurrentModificationException

      document.reload();
      if (version.getCounter() > -1 && document.getRecordVersion().compareTo(version) != 0) // check for record version errors
        if (OFastConcurrentModificationException.enabled())
          throw OFastConcurrentModificationException.instance();
        else
          throw new OConcurrentModificationException(document.getIdentity(), document.getRecordVersion(), version,
              ORecordOperation.DELETED);
    }

    final ODocumentFieldWalker documentFieldWalker = new ODocumentFieldWalker();
    final RidBagDeleter ridBagDeleter = new RidBagDeleter();
View Full Code Here

Examples of com.orientechnologies.orient.core.exception.OConcurrentModificationException

       if (delayed)
         if (record.getRecordVersion().equals(version))
           // POSTPONE DELETION TO BE UNDO IN CASE QUORUM IS NOT RESPECTED
           ((ODistributedStorage) database.getStorage()).pushDeletedRecord(rid, version);
         else
           throw new OConcurrentModificationException(rid, record.getRecordVersion(), version, ORecordOperation.DELETED);
       else
         // DELETE IT RIGHT NOW
         record.delete();
     }
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.