Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions driver/src/main/java/org/neo4j/driver/v1/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,29 @@ public ConfigBuilder withMaxSessions( int size )
*
* @param size the max number of idle sessions to keep open
* @return this builder
* @deprecated please use {@link #withMaxIdleConnections(int)} instead.
*/
@Deprecated
public ConfigBuilder withMaxIdleSessions( int size )
{
this.maxIdleConnectionPoolSize = size;
return this;
}

/**
* The max number of idle connections to keep open at once. Configure this
* higher for greater concurrency, or lower to reduce the pressure on the
* database instance.
*
* @param size the max number of idle connections to keep open
* @return this builder
*/
public ConfigBuilder withMaxIdleConnections( int size )
{
this.maxIdleConnectionPoolSize = size;
return this;
}

/**
* Please use {@link #withConnectionLivenessCheckTimeout(long, TimeUnit)}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ private static Config driverConfig()
return Config.build()
.withTrustStrategy( trustAllCertificates() )
.withEncryption()
.withMaxIdleSessions( 1 )
.withMaxIdleConnections( 1 )
.withConnectionLivenessCheckTimeout( 1, TimeUnit.HOURS )
.toConfig();
}
Expand Down