Package com.orientechnologies.orient.core.index

Examples of com.orientechnologies.orient.core.index.OIndexMVRBTreeAbstract


    // LOCK INVOLVED INDEXES
    List<OIndexMVRBTreeAbstract> lockedIndexes = null;
    try {
      if (involvedIndexes != null)
        for (String indexName : involvedIndexes) {
          final OIndexMVRBTreeAbstract index = (OIndexMVRBTreeAbstract) getMetadata().getIndexManager().getIndexInternal(indexName);
          if (lockedIndexes == null)
            lockedIndexes = new ArrayList<OIndexMVRBTreeAbstract>();

          index.acquireExclusiveLock();
          lockedIndexes.add(index);
        }

      getStorage().commit(currentTx);

      // COMMIT INDEX CHANGES
      final ODocument indexEntries = currentTx.getIndexChanges();
      if (indexEntries != null) {
        for (Entry<String, Object> indexEntry : indexEntries) {
          final OIndex index = getMetadata().getIndexManager().getIndexInternal(indexEntry.getKey());
          index.commit((ODocument) indexEntry.getValue());
        }
      }
    } finally {
      // RELEASE INDEX LOCKS IF ANY
      if (lockedIndexes != null)
        for (OIndexMVRBTreeAbstract index : lockedIndexes) {
          index.releaseExclusiveLock();
        }
    }
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.index.OIndexMVRBTreeAbstract

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.