|
Home | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Basic interface that defines the state boundries for a set of resoures.
Field Summary | |
static int |
STATUS_ABORT_FAILED
Transaction aborted - closed state. |
static int |
STATUS_ABORTED
Transaction aborted - closed state. |
static int |
STATUS_ABORTING
Transaction in the process of aborting. |
static int |
STATUS_BEGINNING
Transaction in the process of beginning. |
static int |
STATUS_COMMITTED
Transaction has been committed - closed state. |
static int |
STATUS_COMMITTING
Transaction is committing. |
static int |
STATUS_IN_PROGRESS
Transaction is in progress and has not been marked STATUS_MARKED_ABORT - open state. |
static int |
STATUS_INSTANTIATED
Transaction has been constructed and not yet begun - closed state. |
static int |
STATUS_MARKED_ABORT
Transaction is in progress, and can only abort - open state. |
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. |
Field Detail |
public static final int STATUS_ABORTED
getStatus()
public static final int STATUS_ABORT_FAILED
getStatus()
public static final int STATUS_ABORTING
getStatus()
public static final int STATUS_BEGINNING
getStatus()
public static final int STATUS_COMMITTED
getStatus()
public static final int STATUS_COMMITTING
getStatus()
public static final int STATUS_IN_PROGRESS
getStatus()
public static final int STATUS_INSTANTIATED
getStatus()
public static final int STATUS_MARKED_ABORT
getStatus()
Method Detail |
public void abort() throws AbortFailedException, TransactionNotOpenException
AbortFailedException
- TransactionNotOpenException
- public void begin() throws TransactionNotClosedException
TransactionNotClosedException
- public void commit() throws TransactionAbortedException, TransactionNotOpenException
AbortedFailedException
- If the transaction attempts to abort and
an exception occurrs.TransactionAbortedException
- If an exeception occurs.TransactionNotOpenException
- isOpen()
public int getStatus()
public boolean isClosed()
public boolean isOpen()
public void join()
leave()
public void leave()
join()
public void setAbortOnly() throws TransactionNotOpenException
TransactionNotOpenException
-
|
Home | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |