public class DefaultCore extends Object implements Core
| 构造器和说明 |
|---|
DefaultCore(RemotingServer remotingServer)
get the Default core.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
begin(String applicationId,
String transactionServiceGroup,
String name,
int timeout) |
BranchStatus |
branchCommit(GlobalSession globalSession,
BranchSession branchSession)
Commit a branch transaction.
|
Long |
branchRegister(BranchType branchType,
String resourceId,
String clientId,
String xid,
String applicationData,
String lockKeys) |
void |
branchReport(BranchType branchType,
String xid,
long branchId,
BranchStatus status,
String applicationData) |
BranchStatus |
branchRollback(GlobalSession globalSession,
BranchSession branchSession)
Rollback a branch transaction.
|
GlobalStatus |
commit(String xid) |
boolean |
doGlobalCommit(GlobalSession globalSession,
boolean retrying)
Do global commit.
|
void |
doGlobalReport(GlobalSession globalSession,
String xid,
GlobalStatus globalStatus)
Do global report.
|
boolean |
doGlobalRollback(GlobalSession globalSession,
boolean retrying)
Do global rollback.
|
AbstractCore |
getCore(BranchType branchType)
get core
|
GlobalStatus |
getStatus(String xid) |
GlobalStatus |
globalReport(String xid,
GlobalStatus globalStatus) |
boolean |
lockQuery(BranchType branchType,
String resourceId,
String xid,
String lockKeys) |
void |
mockCore(BranchType branchType,
AbstractCore core)
only for mock
|
GlobalStatus |
rollback(String xid) |
public DefaultCore(RemotingServer remotingServer)
remotingServer - the remoting serverpublic AbstractCore getCore(BranchType branchType)
branchType - the branchTypepublic void mockCore(BranchType branchType, AbstractCore core)
branchType - the branchTypecore - the corepublic Long branchRegister(BranchType branchType, String resourceId, String clientId, String xid, String applicationData, String lockKeys) throws TransactionException
branchRegister 在接口中 ResourceManagerOutboundTransactionExceptionpublic void branchReport(BranchType branchType, String xid, long branchId, BranchStatus status, String applicationData) throws TransactionException
branchReport 在接口中 ResourceManagerOutboundTransactionExceptionpublic boolean lockQuery(BranchType branchType, String resourceId, String xid, String lockKeys) throws TransactionException
lockQuery 在接口中 ResourceManagerOutboundTransactionExceptionpublic BranchStatus branchCommit(GlobalSession globalSession, BranchSession branchSession) throws TransactionException
TransactionCoordinatorOutboundbranchCommit 在接口中 TransactionCoordinatorOutboundglobalSession - the global sessionbranchSession - the branch sessionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public BranchStatus branchRollback(GlobalSession globalSession, BranchSession branchSession) throws TransactionException
TransactionCoordinatorOutboundbranchRollback 在接口中 TransactionCoordinatorOutboundglobalSession - the global sessionbranchSession - the branch sessionTransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public String begin(String applicationId, String transactionServiceGroup, String name, int timeout) throws TransactionException
begin 在接口中 TransactionManagerTransactionExceptionpublic GlobalStatus commit(String xid) throws TransactionException
commit 在接口中 TransactionManagerTransactionExceptionpublic boolean doGlobalCommit(GlobalSession globalSession, boolean retrying) throws TransactionException
CoredoGlobalCommit 在接口中 CoreglobalSession - the global sessionretrying - the retryingTransactionException - the transaction exceptionpublic GlobalStatus rollback(String xid) throws TransactionException
rollback 在接口中 TransactionManagerTransactionExceptionpublic boolean doGlobalRollback(GlobalSession globalSession, boolean retrying) throws TransactionException
CoredoGlobalRollback 在接口中 CoreglobalSession - the global sessionretrying - the retryingTransactionException - the transaction exceptionpublic GlobalStatus getStatus(String xid) throws TransactionException
getStatus 在接口中 TransactionManagerTransactionExceptionpublic GlobalStatus globalReport(String xid, GlobalStatus globalStatus) throws TransactionException
globalReport 在接口中 TransactionManagerTransactionExceptionpublic void doGlobalReport(GlobalSession globalSession, String xid, GlobalStatus globalStatus) throws TransactionException
CoredoGlobalReport 在接口中 CoreglobalSession - the global sessionxid - Transaction id.globalStatus - the global statusTransactionException - the transaction exceptionCopyright © 2022 Seata. All rights reserved.