|
Home | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xl2.transaction.AbstractTransaction
Skeletal implementation of the Transaction interface. Subclasses need only over-ride the following protected methods:
Fields inherited from interface xl2.transaction.Transaction |
STATUS_ABORT_FAILED, STATUS_ABORTED, STATUS_ABORTING, STATUS_BEGINNING, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_IN_PROGRESS, STATUS_INSTANTIATED, STATUS_MARKED_ABORT |
Constructor Summary | |
AbstractTransaction()
|
Method Summary | |
void |
abort()
Rollback the transaction. |
void |
begin()
Calling begin multiple times on the same transaction, without an intervening call to commit or abort, causes TransactionNotClosedException to be thrown on the second and subsequent calls. |
void |
commit()
Save the transaction state. |
int |
getStatus()
See Transaction STATUS_??? fields. |
boolean |
isClosed()
True if the status aborted, committed, or instantiated. |
boolean |
isOpen()
True if the status is in progress or marked for abort. |
void |
join()
Associates the calling thread to the transaction. |
void |
leave()
Disassociates the calling thread from the transaction. |
void |
setAbortOnly()
Modifies the transaction such that the only possible outcome is to abort the transaction. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractTransaction()
Method Detail |
public void abort() throws AbortFailedException, TransactionNotOpenException
Transaction
abort
in interface Transaction
xl2.transaction.Transaction
AbortFailedException
- TransactionNotOpenException
- public void begin() throws TransactionNotClosedException
Transaction
begin
in interface Transaction
xl2.transaction.Transaction
TransactionNotClosedException
- public void commit() throws TransactionAbortedException, TransactionNotOpenException
Transaction
commit
in interface Transaction
xl2.transaction.Transaction
AbortedFailedException
- If the transaction attempts to abort and
an exception occurrs.TransactionAbortedException
- If an exeception occurs.TransactionNotOpenException
- Transaction.isOpen()
public int getStatus()
Transaction
getStatus
in interface Transaction
public boolean isClosed()
Transaction
isClosed
in interface Transaction
public boolean isOpen()
Transaction
isOpen
in interface Transaction
public void join()
Transaction
join
in interface Transaction
xl2.transaction.Transaction
Transaction.leave()
public void leave()
Transaction
leave
in interface Transaction
xl2.transaction.Transaction
Transaction.join()
public void setAbortOnly() throws TransactionNotOpenException
Transaction
setAbortOnly
in interface Transaction
xl2.transaction.Transaction
TransactionNotOpenException
-
|
Home | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |