public abstract class BaseDataSourceResource<T extends Holdable> extends Object implements SeataDataSourceProxy, Resource, Holder<T>
| Modifier and Type | Field and Description |
|---|---|
protected BranchType |
branchType |
protected DataSource |
dataSource |
protected String |
dbType |
protected Driver |
driver |
protected String |
resourceGroupId |
protected String |
resourceId |
| Constructor and Description |
|---|
BaseDataSourceResource() |
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 in interface SeataDataSourceProxypublic String getResourceId()
getResourceId in interface Resourcepublic void setResourceId(String resourceId)
public String getResourceGroupId()
getResourceGroupId in interface Resourcepublic void setResourceGroupId(String resourceGroupId)
public BranchType getBranchType()
SeataDataSourceProxygetBranchType in interface ResourcegetBranchType in interface 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 in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionprotected void dataSourceCheck()
public PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic static void setBranchStatus(String xaBranchXid, BranchStatus branchStatus)
public static BranchStatus getBranchStatus(String xaBranchXid)
public static void remove(String xaBranchXid)
public boolean isShouldBeHeld()
public void setShouldBeHeld(boolean shouldBeHeld)
Copyright © 2024 Apache. All rights reserved.