public class ShardingDataSource extends AbstractDataSourceAdapter implements AutoCloseable
| 构造器和说明 |
|---|
ShardingDataSource(ShardingRule shardingRule) |
ShardingDataSource(ShardingRule shardingRule,
Map<String,Object> configMap,
Properties props) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
ShardingConnection |
getConnection() |
void |
renew(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(ShardingRule shardingRule) throws SQLException
SQLExceptionpublic ShardingDataSource(ShardingRule shardingRule, Map<String,Object> configMap, Properties props) throws SQLException
SQLExceptionpublic void renew(ShardingRule newShardingRule, Properties newProps) throws SQLException
newShardingRule - new sharding rulenewProps - new sharding propertiesSQLException - SQL exceptionpublic ShardingConnection getConnection() throws SQLException
getConnection 在接口中 DataSourceSQLExceptionpublic void close()
close 在接口中 AutoCloseableCopyright © 2017. All rights reserved.