public final class MasterSlaveDataSource extends AbstractDataSourceAdapter
| 构造器和说明 |
|---|
MasterSlaveDataSource() |
| 限定符和类型 | 方法和说明 |
|---|---|
Connection |
getConnection() |
String |
getDatabaseProductName()
获取数据库名称.
|
DataSource |
getDataSource(SQLType sqlType)
获取主或从节点的数据源.
|
static String |
getDataSourceName(String dataSourceName,
SQLType sqlType)
获取主或从节点的数据源名称.
|
static void |
resetDMLFlag()
重置更新标记.
|
getConnection, getLogWriter, getParentLogger, setLogWritergetLoginTimeout, setLoginTimeoutisWrapperFor, recordMethodInvocation, replayMethodsInvocation, throwSQLExceptionIfNecessary, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWrapperFor, unwrappublic static String getDataSourceName(String dataSourceName, SQLType sqlType)
dataSourceName - 数据源名称sqlType - SQL类型public DataSource getDataSource(SQLType sqlType)
sqlType - SQL类型public String getDatabaseProductName() throws SQLException
SQLException - SQL异常public Connection getConnection() throws SQLException
SQLExceptionpublic static void resetDMLFlag()
Copyright © 2017. All rights reserved.