public abstract class BaseDataSourceResource<T extends Holdable> extends Object implements SeataDataSourceProxy, Resource, Holder<T>
| 限定符和类型 | 字段和说明 |
|---|---|
protected BranchType |
branchType |
protected DataSource |
dataSource |
protected String |
dbType |
protected Driver |
driver |
protected String |
resourceGroupId |
protected String |
resourceId |
| 构造器和说明 |
|---|
BaseDataSourceResource() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
dataSourceCheck() |
BranchType |
getBranchType()
Gets branch type.
|
String |
getDbType() |
Driver |
getDriver() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
String |
getResourceGroupId()
Get the resource group id.
|
String |
getResourceId()
Get the resource id.
|
DataSource |
getTargetDataSource()
Gets target data source.
|
T |
hold(String key,
T value) |
boolean |
isWrapperFor(Class<?> iface) |
T |
lookup(String key) |
T |
release(String key,
T value) |
void |
setBranchType(BranchType branchType) |
void |
setDbType(String dbType) |
void |
setDriver(Driver driver) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setResourceGroupId(String resourceGroupId) |
void |
setResourceId(String resourceId) |
<T> T |
unwrap(Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConnection, getConnectionprotected DataSource dataSource
protected String resourceId
protected String resourceGroupId
protected BranchType branchType
protected String dbType
protected Driver driver
public DataSource getTargetDataSource()
getTargetDataSource 在接口中 SeataDataSourceProxypublic String getResourceId()
ResourcegetResourceId 在接口中 Resourcepublic void setResourceId(String resourceId)
public String getResourceGroupId()
ResourcegetResourceGroupId 在接口中 Resourcepublic void setResourceGroupId(String resourceGroupId)
public BranchType getBranchType()
SeataDataSourceProxygetBranchType 在接口中 ResourcegetBranchType 在接口中 SeataDataSourceProxypublic void setBranchType(BranchType branchType)
public String getDbType()
public void setDbType(String dbType)
public Driver getDriver()
public void setDriver(Driver driver)
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap 在接口中 WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor 在接口中 WrapperSQLExceptionprotected void dataSourceCheck()
public PrintWriter getLogWriter() throws SQLException
getLogWriter 在接口中 CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter 在接口中 CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger 在接口中 CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2020 Seata. All rights reserved.