public class TCCResourceManager extends AbstractResourceManager
LOGGER| 构造器和说明 |
|---|
TCCResourceManager()
Instantiates a new Tcc resource manager.
|
| 限定符和类型 | 方法和说明 |
|---|---|
BranchStatus |
branchCommit(BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
TCC branch commit
|
BranchStatus |
branchRollback(BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
TCC branch rollback
|
BranchType |
getBranchType()
Get the BranchType.
|
protected BusinessActionContext |
getBusinessActionContext(String xid,
long branchId,
String resourceId,
String applicationData)
transfer tcc applicationData to BusinessActionContext
|
Map<String,Resource> |
getManagedResources()
Get all resources managed by this manager.
|
void |
registerResource(Resource resource)
registry TCC resource
|
branchRegister, branchReport, lockQuery, unregisterResourcepublic void registerResource(Resource resource)
registerResource 在接口中 ResourceManagerregisterResource 在类中 AbstractResourceManagerresource - The resource to be managed.public Map<String,Resource> getManagedResources()
ResourceManagerpublic BranchStatus branchCommit(BranchType branchType, String xid, long branchId, String resourceId, String applicationData) throws TransactionException
branchType - xid - Transaction id.branchId - Branch id.resourceId - Resource id.applicationData - Application data bind with this branch.TransactionExceptionpublic BranchStatus branchRollback(BranchType branchType, String xid, long branchId, String resourceId, String applicationData) throws TransactionException
branchType - the branch typexid - Transaction id.branchId - Branch id.resourceId - Resource id.applicationData - Application data bind with this branch.TransactionExceptionprotected BusinessActionContext getBusinessActionContext(String xid, long branchId, String resourceId, String applicationData)
xid - the xidbranchId - the branch idresourceId - the resource idapplicationData - the application datapublic BranchType getBranchType()
ResourceManagerCopyright © 2020 Seata. All rights reserved.