public class Transaction extends Object
Constructor and Description |
---|
Transaction()
Create a new transaction.
|
Transaction(Uid objUid)
AtomicAction constructor with a Uid.
|
Modifier and Type | Method and Description |
---|---|
Future<Integer> |
abort()
Abort (rollback) the transaction.
|
Future<Integer> |
begin()
Start the transaction running.
|
Future<Integer> |
begin(int timeout)
Start the transaction running.
|
Future<Integer> |
commit()
Commit the transaction, and have heuristic reporting.
|
Future<Integer> |
commit(boolean report_heuristics)
Commit the transaction.
|
int |
getTimeout() |
static boolean |
resume(Transaction act)
Resume transaction association on the current thread.
|
static Transaction |
suspend()
Suspend all transaction association from the invoking thread.
|
String |
type()
The type of the class is used to locate the state of the transaction log
in the object store.
|
public Transaction()
public Transaction(Uid objUid)
public Future<Integer> begin()
ActionStatus
indicating outcome.public Future<Integer> begin(int timeout)
timeout
- the timeout associated with the transaction. If the
transaction is still active when this timeout elapses, the
system will automatically roll it back.ActionStatus
indicating outcome.public Future<Integer> commit()
ActionStatus
indicating outcome.public Future<Integer> commit(boolean report_heuristics)
ActionStatus
indicating outcome.public Future<Integer> abort()
ActionStatus
indicating outcome.public final int getTimeout()
public String type()
public static final Transaction suspend()
public static final boolean resume(Transaction act)
act
- the transaction to associate. If this is a nested
transaction, then the thread will be associated with all of
the transactions in the hierarchy.true
if association is successful,
false
otherwise.Copyright © 2021 JBoss by Red Hat. All rights reserved.