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.
|
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.
|
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.GlobalStatus 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.Copyright © 2019 Seata. All rights reserved.