Prepare for release.

pull/1129/merge
Brett Wooldridge 7 years ago
parent 36ffcafe83
commit a11d6a6b39

@ -1,5 +1,36 @@
HikariCP Changes
Changes in 3.0.0
* Removed previously deprecated methods;
HikariConfig.copyState()
HikariConfig.getScheduledExecutorService()
HikariConfig.setScheduledExecutorService()
HikariConfig.isInitializationFailFast()
HikariConfig.setInitializationFailFast()
HikariConfig.isJdbc4ConnectionTest()
HikariConfig.setJdbc4ConnectionTest()
HikariDataSource.copyState()
HikariDataSource.getScheduledExecutorService()
HikariDataSource.setScheduledExecutorService()
HikariDataSource.suspendPool()
HikariDataSource.resumePool()
HikariDataSource.shutdown()
HikariDataSource.isInitializationFailFast()
HikariDataSource.setInitializationFailFast()
HikariDataSource.isJdbc4ConnectionTest()
HikariDataSource.setJdbc4ConnectionTest()
* pull 1110 add currently configured maxConnections and minConnections to pool metrics.
* pull 1100 remove hard-coded percentiles for Micrometer metrics.
* pull 1108 maintain a strong reference to PoolStats for Micrometer gauges to prevent premature
garbage collection.
* pull 1098 update to Micrometer 1.0.0.
Changes in 2.7.8
* fixed 1095 fix breakage caused by sealed configuration with respect to special handling for the
@ -34,7 +65,7 @@ Changes in 2.7.5
* introduced the concept of a "sealed" configuration. Once a pool is started, attempts to
alter its configuration outside of the HikariConfigMXBean will result in an IllegalStateException.
Changes in 2.7.4
* pull 1026 added support for SQL Server's specific isolation level (SNAPSHOT).

@ -29,7 +29,7 @@
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.9-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>HikariCP</name>

@ -37,7 +37,6 @@ 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;
import java.util.concurrent.ThreadLocalRandom;
@ -631,36 +630,6 @@ public class HikariConfig implements HikariConfigMXBean
this.initializationFailTimeout = initializationFailTimeout;
}
/**
* Get whether or not the construction of the pool should throw an exception
* if the minimum number of connections cannot be created.
*
* @return whether or not initialization should fail on error immediately
* @deprecated
*/
@Deprecated
public boolean isInitializationFailFast()
{
return initializationFailTimeout > 0;
}
/**
* Set whether or not the construction of the pool should throw an exception
* if the minimum number of connections cannot be created.
*
* @param failFast true if the pool should fail if the minimum connections cannot be created
* @deprecated
*/
@Deprecated
public void setInitializationFailFast(boolean failFast)
{
if (sealed) throw new IllegalStateException("The configuration of the pool is sealed once started. Use HikariConfigMXBean for runtime changes.");
LOGGER.warn("The initializationFailFast propery is deprecated, see initializationFailTimeout");
initializationFailTimeout = (failFast ? 1 : -1);
}
/**
* Determine whether internal pool queries, principally aliveness checks, will be isolated in their own transaction
* via {@link Connection#rollback()}. Defaults to {@code false}.
@ -685,20 +654,6 @@ public class HikariConfig implements HikariConfigMXBean
this.isIsolateInternalQueries = isolate;
}
@Deprecated
public boolean isJdbc4ConnectionTest()
{
return false;
}
@Deprecated
public void setJdbc4ConnectionTest(boolean useIsValid)
{
if (sealed) throw new IllegalStateException("The configuration of the pool is sealed once started. Use HikariConfigMXBean for runtime changes.");
LOGGER.warn("The jdbcConnectionTest property is now deprecated, see the documentation for connectionTestQuery");
}
public MetricsTrackerFactory getMetricsTrackerFactory()
{
return metricsTrackerFactory;
@ -863,30 +818,6 @@ public class HikariConfig implements HikariConfigMXBean
this.poolName = poolName;
}
/**
* Get the ScheduledExecutorService used for housekeeping.
*
* @return the executor
*/
@Deprecated
public ScheduledThreadPoolExecutor getScheduledExecutorService()
{
return (ScheduledThreadPoolExecutor) scheduledExecutor;
}
/**
* Set the ScheduledExecutorService used for housekeeping.
*
* @param executor the ScheduledExecutorService
*/
@Deprecated
public void setScheduledExecutorService(ScheduledThreadPoolExecutor executor)
{
if (sealed) throw new IllegalStateException("The configuration of the pool is sealed once started. Use HikariConfigMXBean for runtime changes.");
this.scheduledExecutor = executor;
}
/**
* Get the ScheduledExecutorService used for housekeeping.
*
@ -974,20 +905,6 @@ public class HikariConfig implements HikariConfigMXBean
this.sealed = true;
}
/**
* Deprecated, use {@link #copyStateTo(HikariConfig)}.
* <p>
* Copies the state of {@code this} into {@code other}.
*</p>
*
* @param other Other {@link HikariConfig} to copy the state to.
*/
@Deprecated
public void copyState(HikariConfig other)
{
copyStateTo(other);
}
/**
* Copies the state of {@code this} into {@code other}.
*

@ -334,37 +334,6 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
}
}
/**
* Suspend allocation of connections from the pool. All callers to <code>getConnection()</code>
* will block indefinitely until <code>resumePool()</code> is called.
*
* @deprecated Call the {@code HikariPoolMXBean#suspendPool()} method on the {@code HikariPoolMXBean}
* obtained by {@code #getHikariPoolMXBean()} or JMX lookup.
*/
@Deprecated
public void suspendPool()
{
HikariPool p;
if (!isClosed() && (p = pool) != null) {
p.suspendPool();
}
}
/**
* Resume allocation of connections from the pool.
*
* @deprecated Call the {@code HikariPoolMXBean#resumePool()} method on the {@code HikariPoolMXBean}
* obtained by {@code #getHikariPoolMXBean()} or JMX lookup.
*/
@Deprecated
public void resumePool()
{
HikariPool p;
if (!isClosed() && (p = pool) != null) {
p.resumePool();
}
}
/**
* Shutdown the DataSource and its associated pool.
*/
@ -399,18 +368,6 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
return isShutdown.get();
}
/**
* Shutdown the DataSource and its associated pool.
*
* @deprecated This method has been deprecated, please use {@link #close()} instead
*/
@Deprecated
public void shutdown()
{
LOGGER.warn("The shutdown() method has been deprecated, please use the close() method instead");
close();
}
/** {@inheritDoc} */
@Override
public String toString()

@ -16,24 +16,68 @@
package com.zaxxer.hikari;
import javax.sql.DataSource;
/**
* The javax.management MBean for a Hikari pool instance.
*
* @author Brett Wooldridge
*/
public interface HikariPoolMXBean
public interface HikariPoolMXBean
{
/**
* Get the number of currently idle connections in the pool. The return value is extremely transient and is
* a point-in-time measurement.
*
* @return the current number of idle connections in the pool
*/
int getIdleConnections();
/**
* Get the number of currently active connections in the pool. The return value is extremely transient and is
* a point-in-time measurement.
*
* @return the current number of active (in-use) connections in the pool
*/
int getActiveConnections();
/**
* Get the total number of connections currently in the pool. The return value is transient and is a
* point-in-time measurement.
*
* @return the total number of connections in the pool
*/
int getTotalConnections();
/**
* Get the number of threads awaiting connections from the pool. The return value is extremely transient and is
* a point-in-time measurement.
*
* @return the number of threads awaiting a connection from the pool
*/
int getThreadsAwaitingConnection();
/**
* Evict currently idle connections from the pool, and mark active (in-use) connection for eviction when they are
* return to the pool.
*/
void softEvictConnections();
/**
* Suspend the pool. When the pool is suspended, threads calling {@link DataSource#getConnection()} will be
* blocked <i>with no timeout</i> until the pool is resumed via the {@link #resumePool()} method.
* <p/>
* This method has no effect unless the {@link HikariConfig#setAllowPoolSuspension(boolean)} method or equivalent
* property has been set to {@code true}.
*/
void suspendPool();
/**
* Resume the pool. Enables connection borrowing to resume on a pool that has been suspended via the
* {@link #suspendPool()} method.
* <p/>
* This method has no effect unless the {@link HikariConfig#setAllowPoolSuspension(boolean)} method or equivalent
* property has been set to {@code true}.
*/
void resumePool();
}

Loading…
Cancel
Save