|
TrueUpdate Manager Specification 0.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.trueupdate.manager.spec.tx.Transaction
net.java.trueupdate.manager.spec.tx.AtomicMethodsTransaction
public abstract class AtomicMethodsTransaction
A local transaction which is made of truly atomic methods, that is its
methods either completely succeed or completely fail.
On this precondition, this class then cooperates with
Transactions.execute(net.java.trueupdate.manager.spec.tx.Transaction) to make sure that its rollbackAtomic()
method is only called if performAtomic() has succeeded before,
e.g. when composed into a CompositeTransaction.
Transactions.execute(net.java.trueupdate.manager.spec.tx.Transaction),
CompositeTransaction| Constructor Summary | |
|---|---|
AtomicMethodsTransaction()
|
|
| Method Summary | |
|---|---|
void |
commit()
Commits the visible side effects of the body of this transaction. |
void |
commitAtomic()
Semantically identical to commit(), but has to be truly atomic,
that is it either completely succeeds or completely fails. |
void |
perform()
Executes the body of this transaction. |
abstract void |
performAtomic()
Semantically identical to perform(), but has to be truly atomic,
that is it either completely succeeds or completely fails. |
void |
prepare()
Sets up this transaction for execution. |
void |
prepareAtomic()
Semantically identical to prepare(), but has to be truly atomic,
that is it either completely succeeds or completely fails. |
void |
rollback()
Reverts any visible side effects of the body of this transaction. |
abstract void |
rollbackAtomic()
Semantically identical to rollback(), but has to be truly atomic,
that is it either completely succeeds or completely fails. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AtomicMethodsTransaction()
| Method Detail |
|---|
public final void commit()
throws Exception
TransactionTransaction.perform()
must be durable.
If this method fails, the state of this transaction is undefined and may
be inconsistent.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get neither committed nor
rolled back and their state is undefined and may be inconsistent.
commit in class TransactionException
public void commitAtomic()
throws Exception
commit(), but has to be truly atomic,
that is it either completely succeeds or completely fails.
Exception
public final void perform()
throws Exception
TransactionTransaction.rollback(), so it may leave some visible side effects.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get properly rolled back.
perform in class TransactionException
public abstract void performAtomic()
throws Exception
perform(), but has to be truly atomic,
that is it either completely succeeds or completely fails.
Exception
public final void prepare()
throws Exception
TransactionTransaction.rollback(), so it must not leave any visible side effects.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get properly rolled back.
prepare in class TransactionException
public void prepareAtomic()
throws Exception
prepare(), but has to be truly atomic,
that is it either completely succeeds or completely fails.
Exception
public final void rollback()
throws Exception
TransactionTransaction.perform().
If this method fails, the state of this transaction is undefined and may
be inconsistent.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get neither committed nor
rolled back and their state is undefined and may be inconsistent.
rollback in class TransactionException
public abstract void rollbackAtomic()
throws Exception
rollback(), but has to be truly atomic,
that is it either completely succeeds or completely fails.
Exception
|
TrueUpdate Manager Specification 0.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||