Skip to content

Commit f109c36

Browse files
authored
Merge pull request #342 from lutovich/1.2-deprecate-routing-retry-conf
Deprecated old routing retry settings
2 parents 6091eb9 + 78160ae commit f109c36

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
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
@@ -364,7 +364,15 @@ public ConfigBuilder withTrustStrategy( TrustStrategy trustStrategy )
364364
* @param routingFailureLimit
365365
* the number of times to retry each server in the list of routing servers
366366
* @return this builder
367+
* @deprecated in 1.2 because driver memorizes seed URI used during construction and falls back to it at
368+
* runtime when all other known router servers failed to respond. Driver is also able to perform DNS lookup
369+
* for the seed URI during rediscovery. This means updates of cluster members will be picked up if they are
370+
* reflected in a DNS record. This configuration allowed driver to retry rediscovery procedure and postpone
371+
* failure. Currently there exists a better way of doing retries via
372+
* {@link Session#readTransaction(TransactionWork)} and {@link Session#writeTransaction(TransactionWork)}.
373+
* <b>Method will be removed in the next major release.</b>
367374
*/
375+
@Deprecated
368376
public ConfigBuilder withRoutingFailureLimit( int routingFailureLimit )
369377
{
370378
if ( routingFailureLimit < 1 )
@@ -398,7 +406,15 @@ public ConfigBuilder withRoutingFailureLimit( int routingFailureLimit )
398406
* @param unit
399407
* the unit in which the duration is given
400408
* @return this builder
409+
* @deprecated in 1.2 because driver memorizes seed URI used during construction and falls back to it at
410+
* runtime when all other known router servers failed to respond. Driver is also able to perform DNS lookup
411+
* for the seed URI during rediscovery. This means updates of cluster members will be picked up if they are
412+
* reflected in a DNS record. This configuration allowed driver to retry rediscovery procedure and postpone
413+
* failure. Currently there exists a better way of doing retries via
414+
* {@link Session#readTransaction(TransactionWork)} and {@link Session#writeTransaction(TransactionWork)}.
415+
* <b>Method will be removed in the next major release.</b>
401416
*/
417+
@Deprecated
402418
public ConfigBuilder withRoutingRetryDelay( long delay, TimeUnit unit )
403419
{
404420
long routingRetryDelayMillis = unit.toMillis( delay );

0 commit comments

Comments
 (0)