Examples of acquireWriteLock()


Examples of org.neo4j.graphdb.Transaction.acquireWriteLock()

  private int updateSequence(Node sequence, int increment) {
    Transaction tx = neo4jDb.beginTx();
    Lock lock = null;
    try {
      lock = tx.acquireWriteLock( sequence );
      int nextValue = updateSequenceValue( sequence, increment );
      tx.success();
      lock.release();
      return nextValue;
    }
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.acquireWriteLock()

  public int nextValue(IdSourceKey idSourceKey, int increment) {
    Transaction tx = neo4jDb.beginTx();
    Lock lock = null;
    try {
      Node sequence = getSequence( idSourceKey );
      lock = tx.acquireWriteLock( sequence );
      int nextValue = updateSequenceValue( idSourceKey, sequence, increment );
      tx.success();
      lock.release();
      return nextValue;
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.core.TransactionState.acquireWriteLock()

        switch (lockType) {
            case READ:
                state.acquireReadLock(element);
                break;
            case WRITE:
                state.acquireWriteLock(element);
                break;
            default: throw new IllegalStateException("Unknown lock type "+lockType);
        }
    }
    private TransactionImpl getCurrentTransaction() {
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.