public class SagaResourceManager extends AbstractResourceManager
| 构造器和说明 |
|---|
SagaResourceManager()
Instantiates a new saga resource manager.
|
| 限定符和类型 | 方法和说明 |
|---|---|
BranchStatus |
branchCommit(BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
SAGA branch commit
|
BranchStatus |
branchRollback(BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
SAGA branch rollback
|
BranchType |
getBranchType()
Get the BranchType.
|
Map<String,Resource> |
getManagedResources()
Get all resources managed by this manager.
|
void |
registerResource(Resource resource)
registry saga 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.TransactionExceptionpublic BranchType getBranchType()
ResourceManagerCopyright © 2020 Seata. All rights reserved.