|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.kernel.TopLevelTransaction
public class TopLevelTransaction
Field Summary | |
---|---|
protected org.neo4j.kernel.TopLevelTransaction.TransactionOutcome |
transactionOutcome
|
Constructor Summary | |
---|---|
TopLevelTransaction(org.neo4j.kernel.impl.transaction.AbstractTransactionManager transactionManager,
org.neo4j.kernel.impl.transaction.LockManager lockManager,
org.neo4j.kernel.impl.core.TransactionState state)
|
Method Summary | |
---|---|
Lock |
acquireReadLock(PropertyContainer entity)
Acquires a read lock for entity for this transaction. |
Lock |
acquireWriteLock(PropertyContainer entity)
Acquires a write lock for entity for this transaction. |
void |
failure()
Marks this transaction as failed, which means that it will unconditionally be rolled back when Transaction.finish() is called. |
void |
finish()
Commits or marks this transaction for rollback, depending on whether Transaction.success() or Transaction.failure() has been previously invoked. |
protected boolean |
isMarkedAsSuccessful()
|
protected void |
markAsRollbackOnly()
|
void |
success()
Marks this transaction as successful, which means that it will be committed upon invocation of Transaction.finish() unless Transaction.failure()
has or will be invoked before then. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.neo4j.kernel.TopLevelTransaction.TransactionOutcome transactionOutcome
Constructor Detail |
---|
public TopLevelTransaction(org.neo4j.kernel.impl.transaction.AbstractTransactionManager transactionManager, org.neo4j.kernel.impl.transaction.LockManager lockManager, org.neo4j.kernel.impl.core.TransactionState state)
Method Detail |
---|
public void failure()
Transaction
Transaction.finish()
is called. Once
this method has been invoked, it doesn't matter if
Transaction.success()
is invoked afterwards -- the transaction will still be
rolled back.
failure
in interface Transaction
protected void markAsRollbackOnly()
public void success()
Transaction
Transaction.finish()
unless Transaction.failure()
has or will be invoked before then.
success
in interface Transaction
protected boolean isMarkedAsSuccessful()
public void finish()
Transaction
Transaction.success()
or Transaction.failure()
has been previously invoked.
finish
in interface Transaction
public Lock acquireWriteLock(PropertyContainer entity)
Transaction
entity
for this transaction.
The lock (returned from this method) can be released manually, but
if not it's released automatically when the transaction finishes.
acquireWriteLock
in interface Transaction
entity
- the entity to acquire a lock for. If another transaction
currently holds a write lock to that entity this call will wait until
it's released.
Lock
which optionally can be used to release this
lock earlier than when the transaction finishes. If not released
(with Lock.release()
it's going to be released with the
transaction finishes.public Lock acquireReadLock(PropertyContainer entity)
Transaction
entity
for this transaction.
The lock (returned from this method) can be released manually, but
if not it's released automatically when the transaction finishes.
acquireReadLock
in interface Transaction
entity
- the entity to acquire a lock for. If another transaction
currently hold a write lock to that entity this call will wait until
it's released.
Lock
which optionally can be used to release this
lock earlier than when the transaction finishes. If not released
(with Lock.release()
it's going to be released with the
transaction finishes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |