public abstract class AbstractCore extends Object implements Core
| 限定符和类型 | 字段和说明 |
|---|---|
protected LockManager |
lockManager |
protected static org.slf4j.Logger |
LOGGER |
protected RemotingServer |
remotingServer |
| 构造器和说明 |
|---|
AbstractCore(RemotingServer remotingServer) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
begin(String applicationId,
String transactionServiceGroup,
String name,
int timeout) |
BranchStatus |
branchCommit(GlobalSession globalSession,
BranchSession branchSession)
Commit a branch transaction.
|
protected BranchStatus |
branchCommitSend(BranchCommitRequest request,
GlobalSession globalSession,
BranchSession branchSession) |
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.
|
protected BranchStatus |
branchRollbackSend(BranchRollbackRequest request,
GlobalSession globalSession,
BranchSession branchSession) |
protected void |
branchSessionLock(GlobalSession globalSession,
BranchSession branchSession) |
protected void |
branchSessionUnlock(BranchSession branchSession) |
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.
|
abstract BranchType |
getHandleBranchType() |
GlobalStatus |
getStatus(String xid) |
GlobalStatus |
globalReport(String xid,
GlobalStatus globalStatus) |
protected void |
globalSessionStatusCheck(GlobalSession globalSession) |
boolean |
lockQuery(BranchType branchType,
String resourceId,
String xid,
String lockKeys) |
GlobalStatus |
rollback(String xid) |
protected static final org.slf4j.Logger LOGGER
protected LockManager lockManager
protected RemotingServer remotingServer
public AbstractCore(RemotingServer remotingServer)
public abstract BranchType getHandleBranchType()
public Long branchRegister(BranchType branchType, String resourceId, String clientId, String xid, String applicationData, String lockKeys) throws TransactionException
branchRegister 在接口中 ResourceManagerOutboundTransactionExceptionprotected void globalSessionStatusCheck(GlobalSession globalSession) throws GlobalTransactionException
protected void branchSessionLock(GlobalSession globalSession, BranchSession branchSession) throws TransactionException
protected void branchSessionUnlock(BranchSession branchSession) throws TransactionException
public 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.protected BranchStatus branchCommitSend(BranchCommitRequest request, GlobalSession globalSession, BranchSession branchSession) throws IOException, TimeoutException
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.protected BranchStatus branchRollbackSend(BranchRollbackRequest request, GlobalSession globalSession, BranchSession branchSession) throws IOException, TimeoutException
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 globalReport(String xid, GlobalStatus globalStatus) throws TransactionException
globalReport 在接口中 TransactionManagerTransactionExceptionpublic 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 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.