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 )
315
315
*
316
316
* @param size the max number of idle sessions to keep open
317
317
* @return this builder
318
+ * @deprecated please use {@link #withMaxIdleConnections(int)} instead.
318
319
*/
320
+ @ Deprecated
319
321
public ConfigBuilder withMaxIdleSessions ( int size )
320
322
{
321
323
this .maxIdleConnectionPoolSize = size ;
322
324
return this ;
323
325
}
324
326
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
+
325
341
/**
326
342
* Please use {@link #withConnectionLivenessCheckTimeout(long, TimeUnit)}.
327
343
*
Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ private static Config driverConfig()
417
417
return Config .build ()
418
418
.withTrustStrategy ( trustAllCertificates () )
419
419
.withEncryption ()
420
- .withMaxIdleSessions ( 1 )
420
+ .withMaxIdleConnections ( 1 )
421
421
.withConnectionLivenessCheckTimeout ( 1 , TimeUnit .HOURS )
422
422
.toConfig ();
423
423
}
You can’t perform that action at this time.
0 commit comments