public class DefaultGlobalTransaction extends Object implements GlobalTransaction
| 限定符和类型 | 方法和说明 |
|---|---|
void |
begin()
Begin a new global transaction with default timeout and name.
|
void |
begin(int timeout)
Begin a new global transaction with given timeout and default name.
|
void |
begin(int timeout,
String name)
Begin a new global transaction with given timeout and given name.
|
void |
commit()
Commit the global transaction.
|
GlobalStatus |
getStatus()
Ask TC for current status of the corresponding global transaction.
|
String |
getXid()
Get XID.
|
void |
globalReport(GlobalStatus globalStatus)
report the global transaction status.
|
void |
rollback()
Rollback the global transaction.
|
public void begin()
throws TransactionException
GlobalTransactionbegin 在接口中 GlobalTransactionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public void begin(int timeout)
throws TransactionException
GlobalTransactionbegin 在接口中 GlobalTransactiontimeout - Global transaction timeout in MILLISECONDSTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public void begin(int timeout,
String name)
throws TransactionException
GlobalTransactionbegin 在接口中 GlobalTransactiontimeout - Given timeout in MILLISECONDS.name - Given name.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public void commit()
throws TransactionException
GlobalTransactioncommit 在接口中 GlobalTransactionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public void rollback()
throws TransactionException
GlobalTransactionrollback 在接口中 GlobalTransactionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public GlobalStatus getStatus() throws TransactionException
GlobalTransactiongetStatus 在接口中 GlobalTransactionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.GlobalStatuspublic String getXid()
GlobalTransactiongetXid 在接口中 GlobalTransactionpublic void globalReport(GlobalStatus globalStatus) throws TransactionException
GlobalTransactionglobalReport 在接口中 GlobalTransactionglobalStatus - global status.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.Copyright © 2019 Seata. All rights reserved.