public class DataSourceProxy extends AbstractDataSourceProxy implements Resource
targetDataSource| 构造器和说明 |
|---|
DataSourceProxy(DataSource targetDataSource)
Instantiates a new Data source proxy.
|
DataSourceProxy(DataSource targetDataSource,
String resourceGroupId)
Instantiates a new Data source proxy.
|
| 限定符和类型 | 方法和说明 |
|---|---|
BranchType |
getBranchType()
get resource type, AT, TCC, SAGA and XA
|
ConnectionProxy |
getConnection() |
ConnectionProxy |
getConnection(String username,
String password) |
String |
getDbType()
Gets db type.
|
Connection |
getPlainConnection()
Gets plain connection.
|
String |
getResourceGroupId()
Get the resource group id.
|
String |
getResourceId()
Get the resource id.
|
getLoginTimeout, getLogWriter, getParentLogger, getTargetDataSource, isWrapperFor, setLoginTimeout, setLogWriter, unwrappublic DataSourceProxy(DataSource targetDataSource)
targetDataSource - the target data sourcepublic DataSourceProxy(DataSource targetDataSource, String resourceGroupId)
targetDataSource - the target data sourceresourceGroupId - the resource group idpublic Connection getPlainConnection() throws SQLException
SQLException - the sql exceptionpublic String getDbType()
public ConnectionProxy getConnection() throws SQLException
getConnection 在接口中 DataSourceSQLExceptionpublic ConnectionProxy getConnection(String username, String password) throws SQLException
getConnection 在接口中 DataSourceSQLExceptionpublic String getResourceGroupId()
ResourcegetResourceGroupId 在接口中 Resourcepublic String getResourceId()
ResourcegetResourceId 在接口中 Resourcepublic BranchType getBranchType()
ResourcegetBranchType 在接口中 ResourcegetBranchType 在接口中 SeataDataSourceProxyCopyright © 2020 Seata. All rights reserved.