|
|
@ -133,7 +133,7 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener
|
|
|
|
this.transactionIsolation = PoolUtilities.getTransactionIsolation(configuration.getTransactionIsolation());
|
|
|
|
this.transactionIsolation = PoolUtilities.getTransactionIsolation(configuration.getTransactionIsolation());
|
|
|
|
this.isRecordMetrics = configuration.isRecordMetrics();
|
|
|
|
this.isRecordMetrics = configuration.isRecordMetrics();
|
|
|
|
this.metricsTracker = MetricsFactory.createMetricsTracker((isRecordMetrics ? configuration.getMetricsTrackerClassName()
|
|
|
|
this.metricsTracker = MetricsFactory.createMetricsTracker((isRecordMetrics ? configuration.getMetricsTrackerClassName()
|
|
|
|
: "com.zaxxer.hikari.metrics.MetricsTracker"), configuration.getPoolName());
|
|
|
|
: "com.zaxxer.hikari.metrics.MetricsTracker"), this);
|
|
|
|
|
|
|
|
|
|
|
|
this.dataSource = initializeDataSource();
|
|
|
|
this.dataSource = initializeDataSource();
|
|
|
|
|
|
|
|
|
|
|
@ -143,7 +143,7 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener
|
|
|
|
|
|
|
|
|
|
|
|
addConnectionExecutor = createThreadPoolExecutor(configuration.getMaximumPoolSize(), "HikariCP connection filler", configuration.getThreadFactory());
|
|
|
|
addConnectionExecutor = createThreadPoolExecutor(configuration.getMaximumPoolSize(), "HikariCP connection filler", configuration.getThreadFactory());
|
|
|
|
closeConnectionExecutor = createThreadPoolExecutor(configuration.getMaximumPoolSize(), "HikariCP connection closer", configuration.getThreadFactory());
|
|
|
|
closeConnectionExecutor = createThreadPoolExecutor(configuration.getMaximumPoolSize(), "HikariCP connection closer", configuration.getThreadFactory());
|
|
|
|
|
|
|
|
|
|
|
|
fillPool();
|
|
|
|
fillPool();
|
|
|
|
|
|
|
|
|
|
|
|
long delayPeriod = Long.getLong("com.zaxxer.hikari.housekeeping.periodMs", TimeUnit.SECONDS.toMillis(30L));
|
|
|
|
long delayPeriod = Long.getLong("com.zaxxer.hikari.housekeeping.periodMs", TimeUnit.SECONDS.toMillis(30L));
|
|
|
@ -272,6 +272,26 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener
|
|
|
|
return dataSource;
|
|
|
|
return dataSource;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Get the pool configuration object.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return the {@link HikariConfig} for this pool
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public HikariConfig getConfiguration()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return configuration;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Get the metrics tracker for this pool.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return the metrics tracker
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public IMetricsTracker getMetricsTracker()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return metricsTracker;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String toString()
|
|
|
|
public String toString()
|
|
|
|
{
|
|
|
|
{
|
|
|
|