@@ -161,25 +161,45 @@ public ConfigBuilder withLogging( Logging logging )
161161 }
162162
163163 /**
164- * The max number of connections to open at any given time per Neo4j instance.
165- * @param size the size of the connection pool
164+ * The max number of sessions to keep open at once. Configure this
165+ * higher if you want more concurrent sessions, or lower if you want
166+ * to lower the pressure on the database instance.
167+ *
168+ * If the driver is asked to provide more sessions than this, it will
169+ * block waiting for another session to be closed, with a timeout.
170+ *
171+ * @param size the max number of sessions to keep open
166172 * @return this builder
167173 */
168- public ConfigBuilder withConnectionPoolSize ( int size )
174+ public ConfigBuilder withMaxSessions ( int size )
169175 {
170176 this .connectionPoolSize = size ;
171177 return this ;
172178 }
173179
174180 /**
175- * Pooled connections that have been unused for longer than this timeout will be tested before they are
176- * used again, to ensure they are still live.
177- * @param milliSecond minimum idle time in milliseconds
181+ * Pooled sessions that have been unused for longer than this timeout
182+ * will be tested before they are used again, to ensure they are still live.
183+ *
184+ * If this option is set too low, an additional network call will be
185+ * incurred when acquiring a session, which causes a performance hit.
186+ *
187+ * If this is set high, you may receive sessions that are no longer live,
188+ * which will lead to exceptions in your application. Assuming the
189+ * database is running, these exceptions will go away if you retry acquiring
190+ * sessions.
191+ *
192+ * Hence, this parameter tunes a balance between the likelihood of your
193+ * application seeing connection problems, and performance.
194+ *
195+ * You normally should not need to tune this parameter.
196+ *
197+ * @param timeout minimum idle time in milliseconds
178198 * @return this builder
179199 */
180- public ConfigBuilder withMinIdleTimeBeforeConnectionTest ( long milliSecond )
200+ public ConfigBuilder withSessionLivenessCheckTimeout ( long timeout )
181201 {
182- this .idleTimeBeforeConnectionTest = milliSecond ;
202+ this .idleTimeBeforeConnectionTest = timeout ;
183203 return this ;
184204 }
185205
0 commit comments