org.apache.qpid.server.txn
Interface TxnOp

All Known Implementing Classes:
TxAck

public interface TxnOp

This provides the abstraction of an individual operation within a transaction. It is used by the TxnBuffer class.


Method Summary
 void commit()
          Complete the operation started by prepare.
 void prepare()
          Do the part of the operation that updates persistent state
 void rollback()
          Rolls back the operation.
 void undoPrepare()
          This is not the same as rollback.
 

Method Detail

prepare

void prepare()
             throws org.apache.qpid.AMQException
Do the part of the operation that updates persistent state

Throws:
org.apache.qpid.AMQException

commit

void commit()
Complete the operation started by prepare. Can now update in memory state or make netork transfers.


undoPrepare

void undoPrepare()
This is not the same as rollback. Unfortunately the use of an in memory reference count as a locking mechanism and a test for whether a message should be deleted means that as things are, handling an acknowledgement unavoidably alters both memory and persistent state on prepare. This is needed to 'compensate' or undo the in-memory change if the peristent update of later ops fails.


rollback

void rollback()
Rolls back the operation.