public class JbootTCCResourceManager extends io.seata.rm.AbstractResourceManager
| 限定符和类型 | 字段和说明 |
|---|---|
private Map<String,io.seata.core.model.Resource> |
tccResourceCache
TCC resource cache
|
| 构造器和说明 |
|---|
JbootTCCResourceManager()
Instantiates a new Tcc resource manager.
|
| 限定符和类型 | 方法和说明 |
|---|---|
io.seata.core.model.BranchStatus |
branchCommit(io.seata.core.model.BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
TCC branch commit
|
io.seata.core.model.BranchStatus |
branchRollback(io.seata.core.model.BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
TCC branch rollback
|
io.seata.core.model.BranchType |
getBranchType() |
protected io.seata.rm.tcc.api.BusinessActionContext |
getBusinessActionContext(String xid,
long branchId,
String resourceId,
String applicationData)
transfer tcc applicationData to BusinessActionContext
|
Map<String,io.seata.core.model.Resource> |
getManagedResources() |
private Object[] |
getTwoPhaseCommitArgs(io.seata.rm.tcc.TCCResource tccResource,
io.seata.rm.tcc.api.BusinessActionContext businessActionContext)
get phase two commit method's args
|
private Object[] |
getTwoPhaseMethodParams(String[] keys,
Class<?>[] argsClasses,
io.seata.rm.tcc.api.BusinessActionContext businessActionContext) |
private Object[] |
getTwoPhaseRollbackArgs(io.seata.rm.tcc.TCCResource tccResource,
io.seata.rm.tcc.api.BusinessActionContext businessActionContext)
get phase two rollback method's args
|
void |
registerResource(io.seata.core.model.Resource resource)
registry TCC resource
|
private Map<String,io.seata.core.model.Resource> tccResourceCache
public JbootTCCResourceManager()
public void registerResource(io.seata.core.model.Resource resource)
registerResource 在接口中 io.seata.core.model.ResourceManagerregisterResource 在类中 io.seata.rm.AbstractResourceManagerresource - The resource to be managed.public Map<String,io.seata.core.model.Resource> getManagedResources()
public io.seata.core.model.BranchStatus branchCommit(io.seata.core.model.BranchType branchType, String xid, long branchId, String resourceId, String applicationData) throws io.seata.core.exception.TransactionException
branchType - xid - Transaction id.branchId - Branch id.resourceId - Resource id.applicationData - Application data bind with this branch.io.seata.core.exception.TransactionException - TransactionExceptionpublic io.seata.core.model.BranchStatus branchRollback(io.seata.core.model.BranchType branchType, String xid, long branchId, String resourceId, String applicationData) throws io.seata.core.exception.TransactionException
branchType - the branch typexid - Transaction id.branchId - Branch id.resourceId - Resource id.applicationData - Application data bind with this branch.io.seata.core.exception.TransactionException - TransactionExceptionprotected io.seata.rm.tcc.api.BusinessActionContext getBusinessActionContext(String xid, long branchId, String resourceId, String applicationData)
xid - the xidbranchId - the branch idresourceId - the resource idapplicationData - the application dataprivate Object[] getTwoPhaseCommitArgs(io.seata.rm.tcc.TCCResource tccResource, io.seata.rm.tcc.api.BusinessActionContext businessActionContext)
tccResource - tccResourcebusinessActionContext - businessActionContextprivate Object[] getTwoPhaseRollbackArgs(io.seata.rm.tcc.TCCResource tccResource, io.seata.rm.tcc.api.BusinessActionContext businessActionContext)
tccResource - tccResourcebusinessActionContext - businessActionContextprivate Object[] getTwoPhaseMethodParams(String[] keys, Class<?>[] argsClasses, io.seata.rm.tcc.api.BusinessActionContext businessActionContext)
public io.seata.core.model.BranchType getBranchType()
Copyright © 2024. All rights reserved.