TrueUpdate Manager Specification 0.4

net.java.trueupdate.manager.spec.tx
Class CompositeTransaction

java.lang.Object
  extended by net.java.trueupdate.manager.spec.tx.Transaction
      extended by net.java.trueupdate.manager.spec.tx.CompositeTransaction

public final class CompositeTransaction
extends Transaction

A composite transaction.

Author:
Christian Schlichtherle

Constructor Summary
CompositeTransaction(Transaction... txs)
           
 
Method Summary
 void commit()
          Commits the visible side effects of the body of this transaction.
 void perform()
          Executes the body of this transaction.
 void prepare()
          Sets up this transaction for execution.
 void rollback()
          Reverts any visible side effects of the body of this transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeTransaction

public CompositeTransaction(Transaction... txs)
Method Detail

commit

public void commit()
            throws Exception
Description copied from class: Transaction
Commits the visible side effects of the body of this transaction. If this method succeeds, any visible side effects of Transaction.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.

Overrides:
commit in class Transaction
Throws:
Exception

perform

public void perform()
             throws Exception
Description copied from class: Transaction
Executes the body of this transaction. If this method fails then this transaction gets aborted with calling Transaction.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.

Specified by:
perform in class Transaction
Throws:
Exception

prepare

public void prepare()
             throws Exception
Description copied from class: Transaction
Sets up this transaction for execution. If this method fails then this transaction gets aborted without calling Transaction.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.

Overrides:
prepare in class Transaction
Throws:
Exception

rollback

public void rollback()
              throws Exception
Description copied from class: Transaction
Reverts any visible side effects of the body of this transaction. If this method succeeds, it must revert any visible side effects of Transaction.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.

Specified by:
rollback in class Transaction
Throws:
Exception

TrueUpdate Manager Specification 0.4

Copyright © 2013 Schlichtherle IT Services. All rights reserved.