public class DataSourceManager extends AbstractResourceManager
| 构造器和说明 |
|---|
DataSourceManager()
Instantiates a new Data source manager.
|
| 限定符和类型 | 方法和说明 |
|---|---|
BranchStatus |
branchCommit(BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
Commit a branch transaction.
|
BranchStatus |
branchRollback(BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
Rollback a branch transaction.
|
DataSourceProxy |
get(String resourceId)
Get data source proxy.
|
BranchType |
getBranchType()
Get the BranchType.
|
Map<String,Resource> |
getManagedResources()
Get all resources managed by this manager.
|
boolean |
lockQuery(BranchType branchType,
String resourceId,
String xid,
String lockKeys)
Lock query boolean.
|
void |
registerResource(Resource resource)
Register a Resource to be managed by Resource Manager.
|
void |
unregisterResource(Resource resource)
Unregister a Resource from the Resource Manager.
|
branchRegister, branchReportpublic boolean lockQuery(BranchType branchType, String resourceId, String xid, String lockKeys) throws TransactionException
ResourceManagerOutboundlockQuery 在接口中 ResourceManagerOutboundlockQuery 在类中 AbstractResourceManagerbranchType - the branch typeresourceId - the resource idxid - the xidlockKeys - the lock keysTransactionException - the transaction exceptionpublic void registerResource(Resource resource)
ResourceManagerregisterResource 在接口中 ResourceManagerregisterResource 在类中 AbstractResourceManagerresource - The resource to be managed.public void unregisterResource(Resource resource)
ResourceManagerunregisterResource 在接口中 ResourceManagerunregisterResource 在类中 AbstractResourceManagerresource - The resource to be removed.public DataSourceProxy get(String resourceId)
resourceId - the resource idpublic BranchStatus branchCommit(BranchType branchType, String xid, long branchId, String resourceId, String applicationData) throws TransactionException
ResourceManagerInboundbranchType - the branch typexid - Transaction id.branchId - Branch id.resourceId - Resource id.applicationData - Application data bind with this branch.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public BranchStatus branchRollback(BranchType branchType, String xid, long branchId, String resourceId, String applicationData) throws TransactionException
ResourceManagerInboundbranchType - the branch typexid - Transaction id.branchId - Branch id.resourceId - Resource id.applicationData - Application data bind with this branch.TransactionException - Any exception that fails this will be wrapped with TransactionException and thrown
out.public Map<String,Resource> getManagedResources()
ResourceManagerpublic BranchType getBranchType()
ResourceManagerCopyright © 2022 Seata. All rights reserved.