public interface TransactionBuilder
TransactionBuilder
returns a new instance
with the updated configuration that the method call modified.
When the behavior is as desired a call to begin()
will
begin the transaction and return a Transaction
.
// To begin a transaction with default behavior Transaction tx = graphDb.tx().begin(); // To begin a transaction with relaxed force Transaction tx = graphDb.tx().unforced().begin(); // To have relaxed force optionally set by a condition TransactionBuilder txBuilder = graphDb.tx(); if ( condition ) { txBuilder = txBuilder.unforced(); } Transaction tx = txBuilder.begin();
Modifier and Type | Method and Description |
---|---|
Transaction |
begin()
Starts a new transaction and associates it with the current thread.
|
TransactionBuilder |
unforced()
Relaxes the forcing constraint of the logical logs for this transaction
so that the data is written out, but not forced to disk.
|
Transaction begin()
TransactionBuilder unforced()
TransactionBuilder
instance with relaxed force set.Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.