public class ShardingDataSource extends AbstractDataSourceAdapter implements AutoCloseable
| 构造器和说明 |
|---|
ShardingDataSource(Map<String,DataSource> dataSourceMap,
ShardingRule shardingRule) |
ShardingDataSource(Map<String,DataSource> dataSourceMap,
ShardingRule shardingRule,
Map<String,Object> configMap,
Properties props) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
ShardingConnection |
getConnection() |
protected static Map<String,DataSource> |
getRawDataSourceMap(Map<String,DataSource> dataSourceMap) |
protected static ShardingRuleConfiguration |
getShardingRuleConfiguration(Map<String,DataSource> dataSourceMap,
ShardingRuleConfiguration shardingRuleConfig) |
void |
renew(Map<String,DataSource> newDataSourceMap,
ShardingRule newShardingRule,
Properties newProps)
Renew sharding data source.
|
getConnection, getDatabaseType, getLogWriter, getParentLogger, setLogWritergetLoginTimeout, setLoginTimeoutisWrapperFor, recordMethodInvocation, replayMethodsInvocation, throwSQLExceptionIfNecessary, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWrapperFor, unwrappublic ShardingDataSource(Map<String,DataSource> dataSourceMap, ShardingRule shardingRule) throws SQLException
SQLExceptionpublic ShardingDataSource(Map<String,DataSource> dataSourceMap, ShardingRule shardingRule, Map<String,Object> configMap, Properties props) throws SQLException
SQLExceptionpublic void renew(Map<String,DataSource> newDataSourceMap, ShardingRule newShardingRule, Properties newProps)
newDataSourceMap - new data source mapnewShardingRule - new sharding rulenewProps - new sharding propertiespublic ShardingConnection getConnection()
getConnection 在接口中 DataSourcepublic void close()
close 在接口中 AutoCloseableprotected static Map<String,DataSource> getRawDataSourceMap(Map<String,DataSource> dataSourceMap)
protected static ShardingRuleConfiguration getShardingRuleConfiguration(Map<String,DataSource> dataSourceMap, ShardingRuleConfiguration shardingRuleConfig)
Copyright © 2018. All rights reserved.