public class DefaultTransactionManager extends Object implements TransactionManager
| Constructor and Description |
|---|
DefaultTransactionManager() |
| Modifier and Type | Method and Description |
|---|---|
String |
begin(String applicationId,
String transactionServiceGroup,
String name,
int timeout)
Begin a new global transaction.
|
GlobalStatus |
commit(String xid)
Global commit.
|
GlobalStatus |
getStatus(String xid)
Get current status of the give transaction.
|
GlobalStatus |
globalReport(String xid,
GlobalStatus globalStatus)
Global report.
|
GlobalStatus |
rollback(String xid)
Global rollback.
|
public String begin(String applicationId, String transactionServiceGroup, String name, int timeout) throws TransactionException
TransactionManagerbegin in interface TransactionManagerapplicationId - ID of the application who begins this transaction.transactionServiceGroup - ID of the transaction service group.name - Give a name to the global transaction.timeout - Timeout of the global transaction.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public GlobalStatus commit(String xid) throws TransactionException
TransactionManagercommit in interface TransactionManagerxid - XID of the global transaction.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public GlobalStatus rollback(String xid) throws TransactionException
TransactionManagerrollback in interface TransactionManagerxid - XID of the global transactionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public GlobalStatus getStatus(String xid) throws TransactionException
TransactionManagergetStatus in interface TransactionManagerxid - XID of the global transaction.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public GlobalStatus globalReport(String xid, GlobalStatus globalStatus) throws TransactionException
TransactionManagerglobalReport in interface TransactionManagerxid - XID of the global transaction.globalStatus - Status of the global transaction.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.Copyright © 2023 Seata. All rights reserved.