Skip to content

Commit 8290bab

Browse files
author
Zhen
committed
Merge branch '1.5' into 1.5-async
2 parents 5acd107 + 3795190 commit 8290bab

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

driver/src/main/java/org/neo4j/driver/v1/Config.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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
*

driver/src/test/java/org/neo4j/driver/v1/util/cc/Cluster.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)