mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge branch 'master' of https://github.com/AlibabaTech/druid
Conflicts: src/main/java/com/alibaba/druid/pool/DruidDataSource.java src/main/java/com/alibaba/druid/pool/ha/DataSourceHolder.java
This commit is contained in:
@@ -1272,4 +1272,5 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
public String getVersion() {
|
||||
return VERSION.MajorVersion + "." + VERSION.MinorVersion + "." + VERSION.RevisionVersion + "-2011-12-01 12:13";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -228,6 +228,7 @@ public abstract class MultiDataSource extends DataSourceAdapter implements Multi
|
||||
public String[] getDataSourceNames() {
|
||||
return this.dataSources.keySet().toArray(new String[this.dataSources.size()]);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getDbType() {
|
||||
@@ -263,14 +264,14 @@ public abstract class MultiDataSource extends DataSourceAdapter implements Multi
|
||||
public long createTransactionId() {
|
||||
return transactionIdSeed.incrementAndGet();
|
||||
}
|
||||
|
||||
|
||||
public boolean restartDataSource(String name) {
|
||||
DataSourceHolder holder = this.getDataSources().get(name);
|
||||
if (holder != null) {
|
||||
holder.restart();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user