Skip to content

Commit 4c053ca

Browse files
Avoid 3rd party imports for Java Doc. (#823)
One of our 3rd party dependencies, `org.reactivestreams.Subscription`, was imported just for a JavaDoc. This lead to a situation where the usage of the `Config` class needs the library on the classpath. We can avoid this by using a fully qualified import in the Javadoc. I fixed the other 6 imports for consistency, even though they are from our own code.
1 parent 783da84 commit 4c053ca

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

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

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,20 @@
1818
*/
1919
package org.neo4j.driver;
2020

21-
import org.reactivestreams.Subscription;
22-
2321
import java.io.File;
2422
import java.net.InetAddress;
2523
import java.util.Objects;
2624
import java.util.concurrent.TimeUnit;
2725
import java.util.logging.Level;
2826

29-
import org.neo4j.driver.async.AsyncSession;
30-
import org.neo4j.driver.exceptions.ServiceUnavailableException;
31-
import org.neo4j.driver.exceptions.SessionExpiredException;
32-
import org.neo4j.driver.exceptions.TransientException;
3327
import org.neo4j.driver.internal.RevocationStrategy;
3428
import org.neo4j.driver.internal.SecuritySettings;
3529
import org.neo4j.driver.internal.async.pool.PoolSettings;
3630
import org.neo4j.driver.internal.cluster.RoutingSettings;
3731
import org.neo4j.driver.internal.handlers.pulln.FetchSizeUtil;
3832
import org.neo4j.driver.internal.retry.RetrySettings;
3933
import org.neo4j.driver.net.ServerAddressResolver;
40-
import org.neo4j.driver.reactive.RxSession;
4134
import org.neo4j.driver.util.Immutable;
42-
import org.neo4j.driver.util.Resource;
4335

4436
import static java.lang.String.format;
4537
import static org.neo4j.driver.Logging.javaUtilLogging;
@@ -318,8 +310,8 @@ public ConfigBuilder withLogging( Logging logging )
318310
* Enable logging of leaked sessions.
319311
* <p>
320312
* Each {@link Session session} is associated with a network connection and thus is a
321-
* {@link Resource resource} that needs to be explicitly closed. Unclosed sessions will result in socket
322-
* leaks and could cause {@link OutOfMemoryError}s.
313+
* {@link org.neo4j.driver.util.Resource resource} that needs to be explicitly closed.
314+
* Unclosed sessions will result in socket leaks and could cause {@link OutOfMemoryError}s.
323315
* <p>
324316
* Session is considered to be leaked when it is finalized via {@link Object#finalize()} while not being
325317
* closed. This option turns on logging of such sessions and stacktraces of where they were created.
@@ -606,12 +598,13 @@ public ConfigBuilder withRoutingTablePurgeDelay( long delay, TimeUnit unit )
606598
* This config is only valid when the driver is used with servers that support Bolt V4 (Server version 4.0 and later).
607599
*
608600
* Bolt V4 enables pulling records in batches to allow client to take control of data population and apply back pressure to server.
609-
* This config specifies the default fetch size for all query runs using {@link Session} and {@link AsyncSession}.
601+
* This config specifies the default fetch size for all query runs using {@link Session} and {@link org.neo4j.driver.async.AsyncSession}.
610602
* By default, the value is set to {@code 1000}.
611603
* Use {@code -1} to disables back pressure and config client to pull all records at once after each run.
612604
*
613-
* This config only applies to run result obtained via {@link Session} and {@link AsyncSession}.
614-
* As with {@link RxSession}, the batch size is provided via {@link Subscription#request(long)} instead.
605+
* This config only applies to run result obtained via {@link Session} and {@link org.neo4j.driver.async.AsyncSession}.
606+
* As with {@link org.neo4j.driver.reactive.RxSession}, the batch size is provided via
607+
* {@link org.reactivestreams.Subscription#request(long)} instead.
615608
* @param size the default record fetch size when pulling records in batches using Bolt V4.
616609
* @return this builder
617610
*/
@@ -660,9 +653,9 @@ public ConfigBuilder withConnectionTimeout( long value, TimeUnit unit )
660653
/**
661654
* Specify the maximum time transactions are allowed to retry via
662655
* {@link Session#readTransaction(TransactionWork)} and {@link Session#writeTransaction(TransactionWork)}
663-
* methods. These methods will retry the given unit of work on {@link ServiceUnavailableException},
664-
* {@link SessionExpiredException} and {@link TransientException} with exponential backoff using initial
665-
* delay of 1 second.
656+
* methods. These methods will retry the given unit of work on {@link org.neo4j.driver.exceptions.ServiceUnavailableException},
657+
* {@link org.neo4j.driver.exceptions.SessionExpiredException} and {@link org.neo4j.driver.exceptions.TransientException} with
658+
* exponential backoff using initial delay of 1 second.
666659
* <p>
667660
* Default value is 30 seconds.
668661
*

0 commit comments

Comments
 (0)