public abstract class BaseDataSourceResource<T extends Holdable> extends Object implements DataSource, 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()
get resource type, AT, TCC, SAGA and XA
|
String |
getDbType() |
Driver |
getDriver() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
String |
getResourceGroupId()
Get the resource group id.
|
String |
getResourceId()
Get the resource id.
|
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 String getResourceId()
ResourcegetResourceId 在接口中 Resourcepublic void setResourceId(String resourceId)
public String getResourceGroupId()
ResourcegetResourceGroupId 在接口中 Resourcepublic void setResourceGroupId(String resourceGroupId)
public BranchType getBranchType()
ResourcegetBranchType 在接口中 Resourcepublic 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.