File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
main/java/org/neo4j/driver/v1
test/java/org/neo4j/driver/v1/util/cc Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -331,13 +331,29 @@ public ConfigBuilder withMaxSessions( int size )
331331 *
332332 * @param size the max number of idle sessions to keep open
333333 * @return this builder
334+ * @deprecated please use {@link #withMaxIdleConnections(int)} instead.
334335 */
336+ @ Deprecated
335337 public ConfigBuilder withMaxIdleSessions ( int size )
336338 {
337339 this .maxIdleConnectionPoolSize = size ;
338340 return this ;
339341 }
340342
343+ /**
344+ * The max number of idle connections to keep open at once. Configure this
345+ * higher for greater concurrency, or lower to reduce the pressure on the
346+ * database instance.
347+ *
348+ * @param size the max number of idle connections to keep open
349+ * @return this builder
350+ */
351+ public ConfigBuilder withMaxIdleConnections ( int size )
352+ {
353+ this .maxIdleConnectionPoolSize = size ;
354+ return this ;
355+ }
356+
341357 /**
342358 * Please use {@link #withConnectionLivenessCheckTimeout(long, TimeUnit)}.
343359 *
Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ private static Config driverConfig()
417417 return Config .build ()
418418 .withTrustStrategy ( trustAllCertificates () )
419419 .withEncryption ()
420- .withMaxIdleSessions ( 1 )
420+ .withMaxIdleConnections ( 1 )
421421 .withConnectionLivenessCheckTimeout ( 1 , TimeUnit .HOURS )
422422 .toConfig ();
423423 }
You can’t perform that action at this time.
0 commit comments