Package com.orientechnologies.orient.core.record

Examples of com.orientechnologies.orient.core.record.ORecord.lock()


        if (record.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
          record.reload();

        if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_SHARED_LOCK)
          record.lock(false);
        else if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_EXCLUSIVE_LOCK)
          record.lock(true);

        callbackHooks(TYPE.AFTER_READ, record);
        return (RET) record;
View Full Code Here


          record.reload();

        if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_SHARED_LOCK)
          record.lock(false);
        else if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_EXCLUSIVE_LOCK)
          record.lock(true);

        callbackHooks(TYPE.AFTER_READ, record);
        return (RET) record;
      }
View Full Code Here

      if (id instanceof ORecord) {
        record = (ORecord) id;

        // LOCK THE RECORD IF NEEDED
        if (localLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_EXCLUSIVE_LOCK)
          record.lock(true);
        else if (localLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_SHARED_LOCK)
          record.lock(false);

      } else {
        record = getDatabase().load(id.getIdentity(), null, false, false, localLockingStrategy);
View Full Code Here

        // LOCK THE RECORD IF NEEDED
        if (localLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_EXCLUSIVE_LOCK)
          record.lock(true);
        else if (localLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_SHARED_LOCK)
          record.lock(false);

      } else {
        record = getDatabase().load(id.getIdentity(), null, false, false, localLockingStrategy);
        if (id instanceof OContextualRecordId && ((OContextualRecordId) id).getContext() != null) {
          Map<String, Object> ridContext = ((OContextualRecordId) id).getContext();
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.