public interface 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.
|
GlobalTransactionRole |
getGlobalTransactionRole()
get global transaction role.
|
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.
|
void begin()
throws TransactionException
TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.void begin(int timeout)
throws TransactionException
timeout - Global transaction timeout in MILLISECONDSTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.void begin(int timeout,
String name)
throws TransactionException
timeout - Given timeout in MILLISECONDS.name - Given name.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.void commit()
throws TransactionException
TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.void rollback()
throws TransactionException
TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.SuspendedResourcesHolder suspend() throws TransactionException
TransactionException - Any exception that fails this will be wrapped with TransactionException and thrownSuspendedResourcesHoldervoid resume(SuspendedResourcesHolder suspendedResourcesHolder) throws TransactionException
suspendedResourcesHolder - the suspended resources to resumeTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.SuspendedResourcesHolderGlobalStatus getStatus() throws TransactionException
TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.GlobalStatusString getXid()
void globalReport(GlobalStatus globalStatus) throws TransactionException
globalStatus - global status.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.GlobalStatus getLocalStatus()
GlobalStatusGlobalTransactionRole getGlobalTransactionRole()
GlobalTransactionRoleCopyright © 2022 Seata. All rights reserved.