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 |
getLocalStatus()
local status of 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 |
resume(SuspendedResourcesHolder suspendedResourcesHolder)
Resume the global transaction.
|
void |
rollback()
Rollback the global transaction.
|
SuspendedResourcesHolder |
suspend()
Suspend 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 SuspendedResourcesHolder suspend() throws TransactionException
GlobalTransactionsuspend 在接口中 GlobalTransactionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrownSuspendedResourcesHolderpublic void resume(SuspendedResourcesHolder suspendedResourcesHolder) throws TransactionException
GlobalTransactionresume 在接口中 GlobalTransactionsuspendedResourcesHolder - the suspended resources to resumeTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.SuspendedResourcesHolderpublic 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.public GlobalStatus getLocalStatus()
GlobalTransactiongetLocalStatus 在接口中 GlobalTransactionGlobalStatusCopyright © 2020 Seata. All rights reserved.