|
|
|
@ -16,6 +16,10 @@
|
|
|
|
|
|
|
|
|
|
package com.zaxxer.hikari;
|
|
|
|
|
|
|
|
|
|
import static com.zaxxer.hikari.util.UtilityElf.getNullIfEmpty;
|
|
|
|
|
import static java.util.concurrent.TimeUnit.MINUTES;
|
|
|
|
|
import static java.util.concurrent.TimeUnit.SECONDS;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
@ -25,6 +29,7 @@ import java.lang.reflect.Modifier;
|
|
|
|
|
import java.util.Properties;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.TreeSet;
|
|
|
|
|
import java.util.concurrent.ScheduledExecutorService;
|
|
|
|
|
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
|
|
|
|
import java.util.concurrent.ThreadFactory;
|
|
|
|
|
|
|
|
|
@ -40,11 +45,6 @@ import com.codahale.metrics.health.HealthCheckRegistry;
|
|
|
|
|
import com.zaxxer.hikari.metrics.MetricsTrackerFactory;
|
|
|
|
|
import com.zaxxer.hikari.util.PropertyElf;
|
|
|
|
|
|
|
|
|
|
import static java.util.concurrent.TimeUnit.MINUTES;
|
|
|
|
|
import static java.util.concurrent.TimeUnit.SECONDS;
|
|
|
|
|
|
|
|
|
|
import static com.zaxxer.hikari.util.UtilityElf.getNullIfEmpty;
|
|
|
|
|
|
|
|
|
|
public class HikariConfig implements HikariConfigMXBean
|
|
|
|
|
{
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(HikariConfig.class);
|
|
|
|
@ -90,7 +90,7 @@ public class HikariConfig implements HikariConfigMXBean
|
|
|
|
|
private DataSource dataSource;
|
|
|
|
|
private Properties dataSourceProperties;
|
|
|
|
|
private ThreadFactory threadFactory;
|
|
|
|
|
private ScheduledThreadPoolExecutor scheduledExecutor;
|
|
|
|
|
private ScheduledExecutorService scheduledExecutor;
|
|
|
|
|
private MetricsTrackerFactory metricsTrackerFactory;
|
|
|
|
|
private Object metricRegistry;
|
|
|
|
|
private Object healthCheckRegistry;
|
|
|
|
@ -718,9 +718,10 @@ public class HikariConfig implements HikariConfigMXBean
|
|
|
|
|
*
|
|
|
|
|
* @return the executor
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
public ScheduledThreadPoolExecutor getScheduledExecutorService()
|
|
|
|
|
{
|
|
|
|
|
return scheduledExecutor;
|
|
|
|
|
return (ScheduledThreadPoolExecutor) scheduledExecutor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -728,11 +729,32 @@ public class HikariConfig implements HikariConfigMXBean
|
|
|
|
|
*
|
|
|
|
|
* @param executor the ScheduledExecutorService
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
public void setScheduledExecutorService(ScheduledThreadPoolExecutor executor)
|
|
|
|
|
{
|
|
|
|
|
this.scheduledExecutor = executor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the ScheduledExecutorService used for housekeeping.
|
|
|
|
|
*
|
|
|
|
|
* @return the executor
|
|
|
|
|
*/
|
|
|
|
|
public ScheduledExecutorService getScheduledExecutor()
|
|
|
|
|
{
|
|
|
|
|
return scheduledExecutor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the ScheduledExecutorService used for housekeeping.
|
|
|
|
|
*
|
|
|
|
|
* @param executor the ScheduledExecutorService
|
|
|
|
|
*/
|
|
|
|
|
public void setScheduledExecutor(ScheduledExecutorService executor)
|
|
|
|
|
{
|
|
|
|
|
this.scheduledExecutor = executor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getTransactionIsolation()
|
|
|
|
|
{
|
|
|
|
|
return transactionIsolationName;
|
|
|
|
|