public class MasterSlaveDataSource extends AbstractDataSourceAdapter implements AutoCloseable
| 构造器和说明 |
|---|
MasterSlaveDataSource(Map<String,DataSource> dataSourceMap,
MasterSlaveRuleConfiguration masterSlaveRuleConfig,
Map<String,Object> configMap,
Properties props) |
MasterSlaveDataSource(Map<String,DataSource> dataSourceMap,
MasterSlaveRule masterSlaveRule,
Map<String,Object> configMap,
ShardingProperties props) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
Map<String,DataSource> |
getAllDataSources()
Get map of all actual data source name and all actual data sources.
|
MasterSlaveConnection |
getConnection() |
boolean |
showSQL()
Show SQL or not.
|
getConnection, getDatabaseType, getParentLoggergetLoginTimeout, setLoginTimeoutisWrapperFor, recordMethodInvocation, replayMethodsInvocation, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLogWriter, setLogWriterisWrapperFor, unwrappublic MasterSlaveDataSource(Map<String,DataSource> dataSourceMap, MasterSlaveRuleConfiguration masterSlaveRuleConfig, Map<String,Object> configMap, Properties props) throws SQLException
SQLExceptionpublic MasterSlaveDataSource(Map<String,DataSource> dataSourceMap, MasterSlaveRule masterSlaveRule, Map<String,Object> configMap, ShardingProperties props) throws SQLException
SQLExceptionpublic Map<String,DataSource> getAllDataSources()
public final MasterSlaveConnection getConnection()
getConnection 在接口中 DataSourcepublic final void close()
close 在接口中 AutoCloseablepublic boolean showSQL()
Copyright © 2018. All rights reserved.