public class MasterSlaveDataSource extends AbstractDataSourceAdapter
| 构造器和说明 |
|---|
MasterSlaveDataSource(MasterSlaveRule masterSlaveRule,
Map<String,Object> configMap) |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,DataSource> |
getAllDataSources()
Get map of all actual data source name and all actual data sources.
|
Connection |
getConnection() |
NamedDataSource |
getDataSource(SQLType sqlType)
Get data source from master-slave data source.
|
void |
renew(MasterSlaveRule masterSlaveRule)
Renew master-slave data source.
|
static void |
resetDMLFlag()
reset DML flag.
|
getConnection, getDatabaseType, getLogWriter, getParentLogger, setLogWritergetLoginTimeout, setLoginTimeoutisWrapperFor, recordMethodInvocation, replayMethodsInvocation, throwSQLExceptionIfNecessary, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWrapperFor, unwrappublic MasterSlaveDataSource(MasterSlaveRule masterSlaveRule, Map<String,Object> configMap) throws SQLException
SQLExceptionpublic Map<String,DataSource> getAllDataSources()
public static void resetDMLFlag()
public NamedDataSource getDataSource(SQLType sqlType)
sqlType - SQL typepublic void renew(MasterSlaveRule masterSlaveRule)
masterSlaveRule - new master-slave rulepublic Connection getConnection() throws SQLException
SQLExceptionCopyright © 2017. All rights reserved.