From 06d1d8a08709314475df5ba10cc36ccfae61006a Mon Sep 17 00:00:00 2001 From: lutovich Date: Mon, 20 Nov 2017 12:51:36 +0100 Subject: [PATCH 1/3] Deprecated 'idleConnectionPoolSize' config option Newly added 'maxConnectionPoolSize' option should be used instead. --- .../neo4j/driver/internal/DriverFactory.java | 8 +-- .../internal/async/pool/PoolSettings.java | 20 +++---- .../main/java/org/neo4j/driver/v1/Config.java | 52 +++++++++++++------ .../async/pool/ConnectionPoolImplTest.java | 2 +- .../pool/NettyChannelHealthCheckerTest.java | 25 ++++----- .../internal/async/pool/PoolSettingsTest.java | 12 ++--- .../v1/integration/ConnectionHandlingIT.java | 11 ++-- 7 files changed, 68 insertions(+), 62 deletions(-) diff --git a/driver/src/main/java/org/neo4j/driver/internal/DriverFactory.java b/driver/src/main/java/org/neo4j/driver/internal/DriverFactory.java index 633abd2651..299b31ed82 100644 --- a/driver/src/main/java/org/neo4j/driver/internal/DriverFactory.java +++ b/driver/src/main/java/org/neo4j/driver/internal/DriverFactory.java @@ -103,10 +103,10 @@ protected ConnectionPool createConnectionPool( AuthToken authToken, SecurityPlan Clock clock = createClock(); ConnectionSettings settings = new ConnectionSettings( authToken, config.connectionTimeoutMillis() ); ChannelConnector connector = createConnector( settings, securityPlan, config, clock ); - PoolSettings poolSettings = new PoolSettings( config.maxIdleConnectionPoolSize(), - config.idleTimeBeforeConnectionTest(), config.maxConnectionLifetimeMillis(), - config.maxConnectionPoolSize(), - config.connectionAcquisitionTimeoutMillis() ); + PoolSettings poolSettings = new PoolSettings( config.maxConnectionPoolSize(), + config.connectionAcquisitionTimeoutMillis(), config.maxConnectionLifetimeMillis(), + config.idleTimeBeforeConnectionTest() + ); return new ConnectionPoolImpl( connector, bootstrap, poolSettings, config.logging(), clock ); } diff --git a/driver/src/main/java/org/neo4j/driver/internal/async/pool/PoolSettings.java b/driver/src/main/java/org/neo4j/driver/internal/async/pool/PoolSettings.java index e551047ceb..a424aae8db 100644 --- a/driver/src/main/java/org/neo4j/driver/internal/async/pool/PoolSettings.java +++ b/driver/src/main/java/org/neo4j/driver/internal/async/pool/PoolSettings.java @@ -25,30 +25,22 @@ public class PoolSettings public static final int NOT_CONFIGURED = -1; public static final int DEFAULT_MAX_CONNECTION_POOL_SIZE = 100; - public static final int DEFAULT_MAX_IDLE_CONNECTION_POOL_SIZE = DEFAULT_MAX_CONNECTION_POOL_SIZE; public static final long DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST = NOT_CONFIGURED; public static final long DEFAULT_MAX_CONNECTION_LIFETIME = TimeUnit.HOURS.toMillis( 1 ); public static final long DEFAULT_CONNECTION_ACQUISITION_TIMEOUT = TimeUnit.SECONDS.toMillis( 60 ); - private final int maxIdleConnectionPoolSize; - private final long idleTimeBeforeConnectionTest; - private final long maxConnectionLifetime; private final int maxConnectionPoolSize; private final long connectionAcquisitionTimeout; + private final long maxConnectionLifetime; + private final long idleTimeBeforeConnectionTest; - public PoolSettings( int maxIdleConnectionPoolSize, long idleTimeBeforeConnectionTest, long maxConnectionLifetime, - int maxConnectionPoolSize, long connectionAcquisitionTimeout ) + public PoolSettings( int maxConnectionPoolSize, long connectionAcquisitionTimeout, + long maxConnectionLifetime, long idleTimeBeforeConnectionTest ) { - this.maxIdleConnectionPoolSize = maxIdleConnectionPoolSize; - this.idleTimeBeforeConnectionTest = idleTimeBeforeConnectionTest; - this.maxConnectionLifetime = maxConnectionLifetime; this.maxConnectionPoolSize = maxConnectionPoolSize; this.connectionAcquisitionTimeout = connectionAcquisitionTimeout; - } - - public int maxIdleConnectionPoolSize() - { - return maxIdleConnectionPoolSize; + this.maxConnectionLifetime = maxConnectionLifetime; + this.idleTimeBeforeConnectionTest = idleTimeBeforeConnectionTest; } public long idleTimeBeforeConnectionTest() diff --git a/driver/src/main/java/org/neo4j/driver/v1/Config.java b/driver/src/main/java/org/neo4j/driver/v1/Config.java index 1d14d498b6..1322263f12 100644 --- a/driver/src/main/java/org/neo4j/driver/v1/Config.java +++ b/driver/src/main/java/org/neo4j/driver/v1/Config.java @@ -38,7 +38,7 @@ /** * A configuration class to config driver properties. *

- * To create a config: + * To build a simple config with custom logging implementation: *

  * {@code
  * Config config = Config
@@ -47,6 +47,20 @@
  *                  .toConfig();
  * }
  * 
+ *

+ * To build a more complicated config with tuned connection pool options: + *

+ * {@code
+ * Config config = Config.build()
+ *                          .withEncryption()
+ *                          .withConnectionTimeout(10, TimeUnit.SECONDS)
+ *                          .withMaxConnectionLifetime(30, TimeUnit.MINUTES)
+ *                          .withMaxConnectionPoolSize(10)
+ *                          .withConnectionAcquisitionTimeout(20, TimeUnit.SECONDS)
+ *                          .toConfig();
+ * }
+ * 
+ * * @since 1.0 */ @Immutable @@ -56,7 +70,6 @@ public class Config private final Logging logging; private final boolean logLeakedSessions; - private final int maxIdleConnectionPoolSize; private final int maxConnectionPoolSize; private final long idleTimeBeforeConnectionTest; @@ -83,7 +96,6 @@ private Config( ConfigBuilder builder) this.idleTimeBeforeConnectionTest = builder.idleTimeBeforeConnectionTest; this.maxConnectionLifetimeMillis = builder.maxConnectionLifetimeMillis; - this.maxIdleConnectionPoolSize = builder.maxIdleConnectionPoolSize; this.maxConnectionPoolSize = builder.maxConnectionPoolSize; this.connectionAcquisitionTimeoutMillis = builder.connectionAcquisitionTimeoutMillis; @@ -117,21 +129,26 @@ public boolean logLeakedSessions() /** * Max number of connections per URL for this driver. + * * @return the max number of connections + * @deprecated please use {@link #maxConnectionPoolSize()} instead. */ @Deprecated public int connectionPoolSize() { - return maxIdleConnectionPoolSize; + return maxConnectionPoolSize; } /** * Max number of idle connections per URL for this driver. + * * @return the max number of connections + * @deprecated please use {@link #maxConnectionPoolSize()} instead. */ + @Deprecated public int maxIdleConnectionPoolSize() { - return maxIdleConnectionPoolSize; + return maxConnectionPoolSize; } /** @@ -243,7 +260,6 @@ public static class ConfigBuilder { private Logging logging = new JULogging( Level.INFO ); private boolean logLeakedSessions; - private int maxIdleConnectionPoolSize = PoolSettings.DEFAULT_MAX_IDLE_CONNECTION_POOL_SIZE; private int maxConnectionPoolSize = PoolSettings.DEFAULT_MAX_CONNECTION_POOL_SIZE; private long idleTimeBeforeConnectionTest = PoolSettings.DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST; private long maxConnectionLifetimeMillis = PoolSettings.DEFAULT_MAX_CONNECTION_LIFETIME; @@ -311,47 +327,54 @@ public ConfigBuilder withLeakedSessionsLogging() * The max number of sessions to keep open at once. Configure this * higher if you want more concurrent sessions, or lower if you want * to lower the pressure on the database instance. - * + *

* If the driver is asked to provide more sessions than this, it will * block waiting for another session to be closed, with a timeout. + *

+ * Method is deprecated and will forward the given argument to {@link #withMaxConnectionPoolSize(int)}. * * @param size the max number of sessions to keep open * @return this builder + * @deprecated please use {@link #withMaxConnectionPoolSize(int)} instead. */ @Deprecated public ConfigBuilder withMaxSessions( int size ) { - return this; + return withMaxConnectionPoolSize( size ); } /** * The max number of idle sessions to keep open at once. Configure this * higher if you want more concurrent sessions, or lower if you want * to lower the pressure on the database instance. + *

+ * Method is deprecated and will forward the given argument to {@link #withMaxConnectionPoolSize(int)}. * * @param size the max number of idle sessions to keep open * @return this builder - * @deprecated please use {@link #withMaxIdleConnections(int)} instead. + * @deprecated please use {@link #withMaxConnectionPoolSize(int)} instead. */ @Deprecated public ConfigBuilder withMaxIdleSessions( int size ) { - this.maxIdleConnectionPoolSize = size; - return this; + return withMaxConnectionPoolSize( size ); } /** * The max number of idle connections to keep open at once. Configure this * higher for greater concurrency, or lower to reduce the pressure on the * database instance. + *

+ * Method is deprecated and will forward the given argument to {@link #withMaxConnectionPoolSize(int)}. * * @param size the max number of idle connections to keep open * @return this builder + * @deprecated please use {@link #withMaxConnectionPoolSize(int)} instead. */ + @Deprecated public ConfigBuilder withMaxIdleConnections( int size ) { - this.maxIdleConnectionPoolSize = size; - return this; + return withMaxConnectionPoolSize( size ); } /** @@ -366,8 +389,7 @@ public ConfigBuilder withMaxIdleConnections( int size ) @Deprecated public ConfigBuilder withSessionLivenessCheckTimeout( long timeout ) { - withConnectionLivenessCheckTimeout( timeout, TimeUnit.MILLISECONDS ); - return this; + return withConnectionLivenessCheckTimeout( timeout, TimeUnit.MILLISECONDS ); } /** diff --git a/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java b/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java index b58033c90b..ef74dc18dd 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java @@ -169,7 +169,7 @@ private ConnectionPoolImpl newPool() throws Exception ChannelConnectorImpl connector = new ChannelConnectorImpl( connectionSettings, SecurityPlan.forAllCertificates(), DEV_NULL_LOGGING, clock ); - PoolSettings poolSettings = new PoolSettings( 5, -1, -1, 10, 5000 ); + PoolSettings poolSettings = new PoolSettings( 10, 5000, -1, -1 ); Bootstrap bootstrap = BootstrapFactory.newBootstrap( 1 ); return new ConnectionPoolImpl( connector, bootstrap, poolSettings, DEV_NULL_LOGGING, clock ); } diff --git a/driver/src/test/java/org/neo4j/driver/internal/async/pool/NettyChannelHealthCheckerTest.java b/driver/src/test/java/org/neo4j/driver/internal/async/pool/NettyChannelHealthCheckerTest.java index c787c550cf..5d0c383eae 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/async/pool/NettyChannelHealthCheckerTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/async/pool/NettyChannelHealthCheckerTest.java @@ -41,7 +41,6 @@ import static org.neo4j.driver.internal.async.pool.PoolSettings.DEFAULT_CONNECTION_ACQUISITION_TIMEOUT; import static org.neo4j.driver.internal.async.pool.PoolSettings.DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST; import static org.neo4j.driver.internal.async.pool.PoolSettings.DEFAULT_MAX_CONNECTION_POOL_SIZE; -import static org.neo4j.driver.internal.async.pool.PoolSettings.DEFAULT_MAX_IDLE_CONNECTION_POOL_SIZE; import static org.neo4j.driver.internal.async.pool.PoolSettings.NOT_CONFIGURED; import static org.neo4j.driver.internal.logging.DevNullLogging.DEV_NULL_LOGGING; import static org.neo4j.driver.internal.util.Iterables.single; @@ -67,14 +66,13 @@ public void tearDown() @Test public void shouldDropTooOldChannelsWhenMaxLifetimeEnabled() { - int maxConnectionLifetime = 1000; - PoolSettings settings = new PoolSettings( DEFAULT_MAX_IDLE_CONNECTION_POOL_SIZE, - DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST, maxConnectionLifetime, DEFAULT_MAX_CONNECTION_POOL_SIZE, - DEFAULT_CONNECTION_ACQUISITION_TIMEOUT ); + int maxLifetime = 1000; + PoolSettings settings = new PoolSettings( DEFAULT_MAX_CONNECTION_POOL_SIZE, + DEFAULT_CONNECTION_ACQUISITION_TIMEOUT, maxLifetime, DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST ); Clock clock = Clock.SYSTEM; NettyChannelHealthChecker healthChecker = newHealthChecker( settings, clock ); - setCreationTimestamp( channel, clock.millis() - maxConnectionLifetime * 2 ); + setCreationTimestamp( channel, clock.millis() - maxLifetime * 2 ); Future healthy = healthChecker.isHealthy( channel ); assertThat( await( healthy ), is( false ) ); @@ -83,9 +81,8 @@ public void shouldDropTooOldChannelsWhenMaxLifetimeEnabled() @Test public void shouldAllowVeryOldChannelsWhenMaxLifetimeDisabled() { - PoolSettings settings = new PoolSettings( DEFAULT_MAX_IDLE_CONNECTION_POOL_SIZE, - DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST, NOT_CONFIGURED, DEFAULT_MAX_CONNECTION_POOL_SIZE, - DEFAULT_CONNECTION_ACQUISITION_TIMEOUT ); + PoolSettings settings = new PoolSettings( DEFAULT_MAX_CONNECTION_POOL_SIZE, + DEFAULT_CONNECTION_ACQUISITION_TIMEOUT, NOT_CONFIGURED, DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST ); NettyChannelHealthChecker healthChecker = newHealthChecker( settings, Clock.SYSTEM ); setCreationTimestamp( channel, 0 ); @@ -121,9 +118,8 @@ public void shouldDropInactiveConnections() private void testPing( boolean resetMessageSuccessful ) { int idleTimeBeforeConnectionTest = 1000; - PoolSettings settings = new PoolSettings( DEFAULT_MAX_IDLE_CONNECTION_POOL_SIZE, - idleTimeBeforeConnectionTest, NOT_CONFIGURED, DEFAULT_MAX_CONNECTION_POOL_SIZE, - DEFAULT_CONNECTION_ACQUISITION_TIMEOUT ); + PoolSettings settings = new PoolSettings( DEFAULT_MAX_CONNECTION_POOL_SIZE, + DEFAULT_CONNECTION_ACQUISITION_TIMEOUT, NOT_CONFIGURED, idleTimeBeforeConnectionTest ); Clock clock = Clock.SYSTEM; NettyChannelHealthChecker healthChecker = newHealthChecker( settings, clock ); @@ -149,9 +145,8 @@ private void testPing( boolean resetMessageSuccessful ) private void testActiveConnectionCheck( boolean channelActive ) { - PoolSettings settings = new PoolSettings( DEFAULT_MAX_IDLE_CONNECTION_POOL_SIZE, - DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST, NOT_CONFIGURED, DEFAULT_MAX_CONNECTION_POOL_SIZE, - DEFAULT_CONNECTION_ACQUISITION_TIMEOUT ); + PoolSettings settings = new PoolSettings( DEFAULT_MAX_CONNECTION_POOL_SIZE, + DEFAULT_CONNECTION_ACQUISITION_TIMEOUT, NOT_CONFIGURED, DEFAULT_IDLE_TIME_BEFORE_CONNECTION_TEST ); Clock clock = Clock.SYSTEM; NettyChannelHealthChecker healthChecker = newHealthChecker( settings, clock ); diff --git a/driver/src/test/java/org/neo4j/driver/internal/async/pool/PoolSettingsTest.java b/driver/src/test/java/org/neo4j/driver/internal/async/pool/PoolSettingsTest.java index bd47d4d427..c1bba62596 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/async/pool/PoolSettingsTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/async/pool/PoolSettingsTest.java @@ -20,8 +20,6 @@ import org.junit.Test; -import org.neo4j.driver.internal.async.pool.PoolSettings; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -31,7 +29,7 @@ public class PoolSettingsTest @Test public void idleTimeBeforeConnectionTestWhenConfigured() { - PoolSettings settings = new PoolSettings( 10, 42, 10, 5, -1 ); + PoolSettings settings = new PoolSettings( 5, -1, 10, 42 ); assertTrue( settings.idleTimeBeforeConnectionTestEnabled() ); assertEquals( 42, settings.idleTimeBeforeConnectionTest() ); } @@ -40,7 +38,7 @@ public void idleTimeBeforeConnectionTestWhenConfigured() public void idleTimeBeforeConnectionTestWhenSetToZero() { //Always test idle time during acquisition - PoolSettings settings = new PoolSettings( 10, 0, 10, 5, -1 ); + PoolSettings settings = new PoolSettings( 5, -1, 10, 0 ); assertTrue( settings.idleTimeBeforeConnectionTestEnabled() ); assertEquals( 0, settings.idleTimeBeforeConnectionTest() ); } @@ -57,7 +55,7 @@ public void idleTimeBeforeConnectionTestWhenSetToNegativeValue() @Test public void maxConnectionLifetimeWhenConfigured() { - PoolSettings settings = new PoolSettings( 10, 10, 42, 5, -1 ); + PoolSettings settings = new PoolSettings( 5, -1, 42, 10 ); assertTrue( settings.maxConnectionLifetimeEnabled() ); assertEquals( 42, settings.maxConnectionLifetime() ); } @@ -73,13 +71,13 @@ public void maxConnectionLifetimeWhenSetToZeroOrNegativeValue() private static void testIdleTimeBeforeConnectionTestWithIllegalValue( int value ) { - PoolSettings settings = new PoolSettings( 10, value, 10, 5, -1 ); + PoolSettings settings = new PoolSettings( 5, -1, 10, value ); assertFalse( settings.idleTimeBeforeConnectionTestEnabled() ); } private static void testMaxConnectionLifetimeWithIllegalValue( int value ) { - PoolSettings settings = new PoolSettings( 10, 10, value, 5, -1 ); + PoolSettings settings = new PoolSettings( 5, -1, value, 10 ); assertFalse( settings.maxConnectionLifetimeEnabled() ); } } diff --git a/driver/src/test/java/org/neo4j/driver/v1/integration/ConnectionHandlingIT.java b/driver/src/test/java/org/neo4j/driver/v1/integration/ConnectionHandlingIT.java index 1ca806270c..4e05844193 100644 --- a/driver/src/test/java/org/neo4j/driver/v1/integration/ConnectionHandlingIT.java +++ b/driver/src/test/java/org/neo4j/driver/v1/integration/ConnectionHandlingIT.java @@ -298,9 +298,9 @@ protected ConnectionPool createConnectionPool( AuthToken authToken, SecurityPlan Bootstrap bootstrap, Config config ) { ConnectionSettings connectionSettings = new ConnectionSettings( authToken, 1000 ); - PoolSettings poolSettings = new PoolSettings( config.maxIdleConnectionPoolSize(), - config.idleTimeBeforeConnectionTest(), config.maxConnectionLifetimeMillis(), - config.maxConnectionPoolSize(), config.connectionAcquisitionTimeoutMillis() ); + PoolSettings poolSettings = new PoolSettings( config.maxConnectionPoolSize(), + config.connectionAcquisitionTimeoutMillis(), config.maxConnectionLifetimeMillis(), + config.idleTimeBeforeConnectionTest() ); Clock clock = createClock(); ChannelConnector connector = super.createConnector( connectionSettings, securityPlan, config, clock ); connectionPool = @@ -314,9 +314,8 @@ private static class MemorizingConnectionPool extends ConnectionPoolImpl Connection lastAcquiredConnectionSpy; boolean memorize; - public MemorizingConnectionPool( ChannelConnector connector, - Bootstrap bootstrap, PoolSettings settings, Logging logging, - Clock clock ) + MemorizingConnectionPool( ChannelConnector connector, Bootstrap bootstrap, PoolSettings settings, + Logging logging, Clock clock ) { super( connector, bootstrap, settings, logging, clock ); } From 239ff363d56b0482fa1d9fb39e077c25efda6913 Mon Sep 17 00:00:00 2001 From: lutovich Date: Tue, 21 Nov 2017 18:58:14 +0100 Subject: [PATCH 2/3] Improved javadoc for couple Config methods --- driver/src/main/java/org/neo4j/driver/v1/Config.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/driver/src/main/java/org/neo4j/driver/v1/Config.java b/driver/src/main/java/org/neo4j/driver/v1/Config.java index 1322263f12..4f34a38644 100644 --- a/driver/src/main/java/org/neo4j/driver/v1/Config.java +++ b/driver/src/main/java/org/neo4j/driver/v1/Config.java @@ -335,7 +335,8 @@ public ConfigBuilder withLeakedSessionsLogging() * * @param size the max number of sessions to keep open * @return this builder - * @deprecated please use {@link #withMaxConnectionPoolSize(int)} instead. + * @deprecated please use a combination of {@link #withMaxConnectionPoolSize(int)} and + * {@link #withConnectionAcquisitionTimeout(long, TimeUnit)} instead. */ @Deprecated public ConfigBuilder withMaxSessions( int size ) @@ -352,7 +353,8 @@ public ConfigBuilder withMaxSessions( int size ) * * @param size the max number of idle sessions to keep open * @return this builder - * @deprecated please use {@link #withMaxConnectionPoolSize(int)} instead. + * @deprecated please use a combination of {@link #withMaxConnectionPoolSize(int)} and + * {@link #withConnectionAcquisitionTimeout(long, TimeUnit)} instead. */ @Deprecated public ConfigBuilder withMaxIdleSessions( int size ) @@ -369,7 +371,8 @@ public ConfigBuilder withMaxIdleSessions( int size ) * * @param size the max number of idle connections to keep open * @return this builder - * @deprecated please use {@link #withMaxConnectionPoolSize(int)} instead. + * @deprecated please use a combination of {@link #withMaxConnectionPoolSize(int)} and + * {@link #withConnectionAcquisitionTimeout(long, TimeUnit)} instead. */ @Deprecated public ConfigBuilder withMaxIdleConnections( int size ) From b8db2f0502300690a0bce009e29cecd8cf25ea83 Mon Sep 17 00:00:00 2001 From: lutovich Date: Thu, 23 Nov 2017 10:26:27 +0100 Subject: [PATCH 3/3] Ignore `maxIdleSessions` and `maxIdleConnections` These two config settings will now be ignored and not delegate to `maxConnectionPoolSize`. This feels better because logic of enforcing "max idle" is now gone. --- driver/src/main/java/org/neo4j/driver/v1/Config.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/driver/src/main/java/org/neo4j/driver/v1/Config.java b/driver/src/main/java/org/neo4j/driver/v1/Config.java index 4f34a38644..835a777bba 100644 --- a/driver/src/main/java/org/neo4j/driver/v1/Config.java +++ b/driver/src/main/java/org/neo4j/driver/v1/Config.java @@ -349,7 +349,7 @@ public ConfigBuilder withMaxSessions( int size ) * higher if you want more concurrent sessions, or lower if you want * to lower the pressure on the database instance. *

- * Method is deprecated and will forward the given argument to {@link #withMaxConnectionPoolSize(int)}. + * Method is deprecated and will not change the driver configuration. * * @param size the max number of idle sessions to keep open * @return this builder @@ -359,7 +359,7 @@ public ConfigBuilder withMaxSessions( int size ) @Deprecated public ConfigBuilder withMaxIdleSessions( int size ) { - return withMaxConnectionPoolSize( size ); + return this; } /** @@ -367,7 +367,7 @@ public ConfigBuilder withMaxIdleSessions( int size ) * higher for greater concurrency, or lower to reduce the pressure on the * database instance. *

- * Method is deprecated and will forward the given argument to {@link #withMaxConnectionPoolSize(int)}. + * Method is deprecated and will not change the driver configuration. * * @param size the max number of idle connections to keep open * @return this builder @@ -377,7 +377,7 @@ public ConfigBuilder withMaxIdleSessions( int size ) @Deprecated public ConfigBuilder withMaxIdleConnections( int size ) { - return withMaxConnectionPoolSize( size ); + return this; } /**