Skip to content

Commit 08c8092

Browse files
committed
Drop the '4' from ioSessionStrategy
1 parent 820bc92 commit 08c8092

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public SslProfile profile(String profileName) {
232232
* @return Never {@code null}.
233233
* @deprecated This method will fail if the SSL configuration uses a {@link org.elasticsearch.common.settings.SecureSetting} but the
234234
* {@link org.elasticsearch.common.settings.SecureSettings} have been closed. Use {@link #profile(String)}
235-
* and {@link SslProfile#ioSessionStrategy4()}
235+
* and {@link SslProfile#ioSessionStrategy()}
236236
* (Deprecated, but not removed because monitoring uses dynamic SSL settings)
237237
*/
238238
@Deprecated
@@ -735,7 +735,7 @@ public SSLConnectionSocketFactory connectionSocketFactory() {
735735
}
736736

737737
@Override
738-
public SSLIOSessionStrategy ioSessionStrategy4() {
738+
public SSLIOSessionStrategy ioSessionStrategy() {
739739
return SSLIOSessionStrategyBuilder.INSTANCE.build(this.sslConfiguration, context);
740740
}
741741

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SslProfile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public interface SslProfile {
4141
/**
4242
* @return An object that is useful for configuring Apache Http Client v4.x
4343
*/
44-
SSLIOSessionStrategy ioSessionStrategy4();
44+
SSLIOSessionStrategy ioSessionStrategy();
4545

4646
/**
4747
* @return An object that is useful for configuring Apache Http Client v5.x

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ public void testThatSSLIOSessionStrategyWithoutSettingsWorks() throws Exception
899899
SSLService sslService = new SSLService(env);
900900
SslProfile profile = sslService.profile("xpack.security.transport.ssl");
901901
logger.info("SSL Configuration: {}", profile.configuration());
902-
SSLIOSessionStrategy sslStrategy = profile.ioSessionStrategy4();
902+
SSLIOSessionStrategy sslStrategy = profile.ioSessionStrategy();
903903
try (CloseableHttpAsyncClient client = getAsyncHttpClient(sslStrategy)) {
904904
client.start();
905905

@@ -920,7 +920,7 @@ public void testThatSSLIOSessionStrategyTrustsJDKTrustedCAs() throws Exception {
920920
.build();
921921
final SSLService sslService = new SSLService(TestEnvironment.newEnvironment(buildEnvSettings(settings)));
922922
final SslProfile profile = sslService.profile("xpack.security.transport.ssl");
923-
final SSLIOSessionStrategy sslStrategy = profile.ioSessionStrategy4();
923+
final SSLIOSessionStrategy sslStrategy = profile.ioSessionStrategy();
924924
try (CloseableHttpAsyncClient client = getAsyncHttpClient(sslStrategy)) {
925925
client.start();
926926

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/HttpClientManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static HttpClientManager create(
118118
) {
119119
// Set the sslStrategy to ensure an encrypted connection, as Elastic Inference Service requires it.
120120
final SSLIOSessionStrategy sslioSessionStrategy = sslService.profile(ELASTIC_INFERENCE_SERVICE_SSL_CONFIGURATION_PREFIX)
121-
.ioSessionStrategy4();
121+
.ioSessionStrategy();
122122
PoolingNHttpClientConnectionManager connectionManager = createConnectionManager(sslioSessionStrategy, connectionTtl);
123123
return new HttpClientManager(settings, connectionManager, threadPool, clusterService, throttlerManager);
124124
}

x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ private static SSLIOSessionStrategy configureSslStrategy(
760760
// Due to #registerSettingValidators we know that the settings not been dynamically updated, and the pre-configured strategy
761761
// is still the correct configuration for use in this exporter.
762762
final SslProfile profile = sslService.profile(concreteSetting.getKey());
763-
sslStrategy = profile.ioSessionStrategy4();
763+
sslStrategy = profile.ioSessionStrategy();
764764
}
765765
return sslStrategy;
766766
}

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/ssl/SSLErrorMessageCertificateVerificationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private RestClient buildRestClient(SSLService sslService, MockWebServer webServe
181181
final SslProfile profile = sslService.profile(HTTP_CLIENT_SSL);
182182
final HttpHost httpHost = new HttpHost(webServer.getHostName(), webServer.getPort(), "https");
183183
return RestClient.builder(httpHost)
184-
.setHttpClientConfigCallback(client -> client.setSSLStrategy(profile.ioSessionStrategy4()))
184+
.setHttpClientConfigCallback(client -> client.setSSLStrategy(profile.ioSessionStrategy()))
185185
.build();
186186
}
187187

0 commit comments

Comments
 (0)