org.melati.poem.transaction
Class Transaction

Package class diagram package Transaction
java.lang.Object
  extended by org.melati.poem.transaction.Transaction
Direct Known Subclasses:
PoemTransaction

public abstract class Transaction
extends Object

A Transaction.


Field Summary
 int index
          Index of the Transaction.
 int mask
          Mask.
 int negMask
          Negative mask.
 
Constructor Summary
Transaction(TransactionPool transactionPoolP, int indexP)
          Constructor.
 
Method Summary
protected abstract  void backingCommit()
           
protected abstract  void backingRollback()
           
 void commit()
          Finish up, for example write to database.
 Transaction getBlockedOn()
           
 void rollback()
          Finish without commit.
 String toString()
          The transaction index.
 void writeDown()
          Make persistent ie no longer able to be rolled back.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

public final int index
Index of the Transaction.


mask

public final int mask
Mask.


negMask

public final int negMask
Negative mask.

Constructor Detail

Transaction

public Transaction(TransactionPool transactionPoolP,
                   int indexP)
Constructor.

Parameters:
transactionPoolP - the pool this transaction belongs to
indexP - the key for this Transaction
Method Detail

backingCommit

protected abstract void backingCommit()

backingRollback

protected abstract void backingRollback()

writeDown

public void writeDown()
Make persistent ie no longer able to be rolled back.


commit

public void commit()
Finish up, for example write to database.


rollback

public void rollback()
Finish without commit.


getBlockedOn

public Transaction getBlockedOn()
Returns:
the Transaction we are waiting for

toString

public String toString()
The transaction index.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2000-2010 PanEris. All Rights Reserved.