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
18 changes: 9 additions & 9 deletions driver/src/main/java/org/neo4j/driver/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ public final class Config implements Serializable {

/**
* Defines whether the driver should try using TCP Fast Open if the runtime supports it. This option is ignored
* when the conditions described in {@link ConfigBuilder#withTcpFastOpenEnabled(boolean)} are not met.
* when the conditions described in {@link ConfigBuilder#withTryTcpFastOpen(boolean)} are not met.
* <p>
* <b>This option is experimental.</b>
* @since 6.0.0
*/
@Experimental
private final boolean tcpFastOpenEnabled;
private final boolean tryTcpFastOpen;

private Config(ConfigBuilder builder) {
this.logging = builder.logging;
Expand All @@ -195,7 +195,7 @@ private Config(ConfigBuilder builder) {
this.eventLoopThreads = builder.eventLoopThreads;
this.telemetryDisabled = builder.telemetryDisabled;
this.observationProvider = builder.observationProvider;
this.tcpFastOpenEnabled = builder.tcpFastOpenEnabled;
this.tryTcpFastOpen = builder.tryTcpFastOpen;
}

/**
Expand Down Expand Up @@ -418,7 +418,7 @@ public Optional<ObservationProvider> observationProvider() {

/**
* Returns whether the driver should try using TCP Fast Open if the runtime supports it. This option is ignored
* when the conditions described in {@link ConfigBuilder#withTcpFastOpenEnabled(boolean)} are not met.
* when the conditions described in {@link ConfigBuilder#withTryTcpFastOpen(boolean)} are not met.
* <p>
* <b>This option is experimental.</b>
* <p>
Expand All @@ -428,8 +428,8 @@ public Optional<ObservationProvider> observationProvider() {
* @since 6.0.0
*/
@Experimental
public boolean isTcpFastOpenEnabled() {
return tcpFastOpenEnabled;
public boolean isTryTcpFastOpen() {
return tryTcpFastOpen;
}

/**
Expand All @@ -454,7 +454,7 @@ public static final class ConfigBuilder {
private long fetchSize = 1000;
private int eventLoopThreads = 0;
private ObservationProvider observationProvider;
private boolean tcpFastOpenEnabled;
private boolean tryTcpFastOpen;

@SuppressWarnings("deprecation")
private NotificationConfig notificationConfig = NotificationConfig.defaultConfig();
Expand Down Expand Up @@ -950,8 +950,8 @@ public ConfigBuilder withTelemetryDisabled(boolean telemetryDisabled) {
* @since 6.0.0
*/
@Experimental
public ConfigBuilder withTcpFastOpenEnabled(boolean enabled) {
this.tcpFastOpenEnabled = enabled;
public ConfigBuilder withTryTcpFastOpen(boolean enabled) {
this.tryTcpFastOpen = enabled;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ private BoltConnectionProvider createBoltConnectionProvider(
if (localAddress != null) {
additionalConfig.put("localAddress", localAddress);
}
additionalConfig.put("enableFastOpen", config.isTcpFastOpenEnabled());
additionalConfig.put("enableFastOpen", config.isTryTcpFastOpen());
return boltConnectionProviderFactory.create(
loggingProvider, BoltValueFactory.getInstance(), observationProvider, additionalConfig);
}
Expand Down