Package org.neo4j.graphdb

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


          addTableSequence( idSourceKey.getMetadata(), (String) idSourceKey.getColumnValues()[0], initialValue );
          sequence = getSequence( idSourceKey );
        }
      }

      lock = tx.acquireWriteLock( sequence );
      int nextValue = updateSequenceValue( idSourceKey, sequence, increment );
      tx.success();
      lock.release();
      return nextValue;
    }
View Full Code Here


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

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

  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

  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

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.