qflib 0.98.1

de.qfs.lib.transaction
Interface Commitable

All Known Implementing Classes:
CommitableNotify, CommitableStateChange

public interface Commitable

A Commitable serves as a placeholder for an action that is either delayed until it is safe to execute, or that can be undone.

Commitables are collected in a Transaction and either will all of them be commited or all of them rolled back. If something really bad happens during commit or rollback, e.g. a database commit fails, a FatalTransactionException should be thrown to signal that the whole commit or rollback operation is void.

Since:
0.97.0
Version:
$Revision: 1.4 $
Author:
Gregor Schmid

Method Summary
 void commit()
          Commit the action of the Commitable.
 void rollback()
          Undo the action of the Commitable.
 

Method Detail

commit

public void commit()
            throws FatalTransactionException
Commit the action of the Commitable.
Throws:
FatalTransactionException - If something fails in a way that makes completion of commit impossible.

rollback

public void rollback()
              throws FatalTransactionException
Undo the action of the Commitable.
Throws:
FatalTransactionException - If something fails in a way that makes completion of rollback impossible.

qflib 0.98.1