aleph.trans
Class SimpleTransactionManager
java.lang.Object
|
+--aleph.trans.TransactionManager
|
+--aleph.trans.SimpleTransactionManager
- public class SimpleTransactionManager
- extends TransactionManager
Simple Transaction Manager. Placeholder until we get a real transaction manager.
Currently supports transactions only within a single PE.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
SimpleTransactionManager
public SimpleTransactionManager()
commit
public void commit(Transaction t)
throws AlephException
- Try to commit a transaction.
- Parameters:
transaction - Transaction to commit.- Returns:
true if and only if commit succeeds.- Throws:
- AlephException - if transaction aborts
- Overrides:
- commit in class TransactionManager
open
public java.lang.Object open(GlobalObject object,
Transaction t,
java.lang.String mode)
- Open an object for access.
- Parameters:
object - The object.transaction - Transaction on behalf of which operations occur.mode - E.g., Read, Write, Copy, etc.- Overrides:
- open in class TransactionManager
open
public java.lang.Object open(GlobalObject object,
java.lang.String mode)
- Open an object.
- Parameters:
object - The object.mode - E.g., Read, Write, Copy, etc.- Overrides:
- open in class TransactionManager
newObject
public void newObject(GlobalObject key,
java.lang.Object object,
java.lang.String hint)
- Register newly-created global object.
- Parameters:
key - Global object IDobject - Initial state for global object.hint - ignored- Overrides:
- newObject in class TransactionManager
release
public void release(GlobalObject key)
- Called when object no longer needed.
- Parameters:
object - Formerly interesting object.- Overrides:
- release in class TransactionManager
toString
public java.lang.String toString()
- Produce a human-readable snapshot of all global objects. Very helpful in
a panic.
- Overrides:
- toString in class java.lang.Object
getLabel
public java.lang.String getLabel()
- Returns:
- Label describing which communication manager we are.
- Overrides:
- getLabel in class TransactionManager
status
public int status(Transaction t)
- Returns:
- whether transaction is active, committed, or aborted.
- Overrides:
- status in class TransactionManager