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 )
331
331
*
332
332
* @param size the max number of idle sessions to keep open
333
333
* @return this builder
334
+ * @deprecated please use {@link #withMaxIdleConnections(int)} instead.
334
335
*/
336
+ @ Deprecated
335
337
public ConfigBuilder withMaxIdleSessions ( int size )
336
338
{
337
339
this .maxIdleConnectionPoolSize = size ;
338
340
return this ;
339
341
}
340
342
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
+
341
357
/**
342
358
* Please use {@link #withConnectionLivenessCheckTimeout(long, TimeUnit)}.
343
359
*
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