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 @@ -315,13 +315,29 @@ public ConfigBuilder withMaxSessions( int size )
315315 *
316316 * @param size the max number of idle sessions to keep open
317317 * @return this builder
318+ * @deprecated please use {@link #withMaxIdleConnections(int)} instead.
318319 */
320+ @ Deprecated
319321 public ConfigBuilder withMaxIdleSessions ( int size )
320322 {
321323 this .maxIdleConnectionPoolSize = size ;
322324 return this ;
323325 }
324326
327+ /**
328+ * The max number of idle connections to keep open at once. Configure this
329+ * higher for greater concurrency, or lower to reduce the pressure on the
330+ * database instance.
331+ *
332+ * @param size the max number of idle connections to keep open
333+ * @return this builder
334+ */
335+ public ConfigBuilder withMaxIdleConnections ( int size )
336+ {
337+ this .maxIdleConnectionPoolSize = size ;
338+ return this ;
339+ }
340+
325341 /**
326342 * Please use {@link #withConnectionLivenessCheckTimeout(long, TimeUnit)}.
327343 *
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