|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Runtime.Transactions.CommitRecord
public class CommitRecord
A CommitRecord
keeps track of the status of a transaction.
It is initialized in the WAITING
state and can be updated
exactly once to either COMMITTED or ABORTED. Transactions can be nested;
therefore CommitRecord
s can be dependent on other commit
records.
Field Summary | |
---|---|
static int |
ABORTED
|
static int |
COMMITTED
|
CommitRecord |
parent
The commit record that this is dependent on, if any. |
static int |
WAITING
|
Method Summary | |
---|---|
int |
abort()
Abort this (sub)transaction, if possible. |
static int |
abort(CommitRecord c)
Abort a transaction, if possible. |
int |
commit()
Commit this (sub)transaction, if possible. |
static int |
commit(CommitRecord c)
Commit a transaction, if possible. |
void |
commitTransaction()
|
static CommitRecord |
newTransaction(CommitRecord parent)
Constructor method. |
CommitRecord |
retryTransaction()
Returns a new commit record suitable for retrying this transaction. |
int |
state()
Returns the 'state' of this record (including dependencies) |
static int |
state(CommitRecord c)
'StateP' procedure from write-up. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WAITING
public static final int COMMITTED
public static final int ABORTED
public final CommitRecord parent
Method Detail |
---|
public static CommitRecord newTransaction(CommitRecord parent)
public final CommitRecord retryTransaction() throws TransactionAbortException
TransactionAbortException
- if this transaction has been
retried too many times.public final void commitTransaction() throws TransactionAbortException
TransactionAbortException
public int state()
public static int state(CommitRecord c)
public int abort()
public int commit()
public static int abort(CommitRecord c)
public static int commit(CommitRecord c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |