Skip to content

Commit 23d869a

Browse files
committed
Revert executorService change
1 parent 2413081 commit 23d869a

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

runtime/protocol/http-client-engines/http-client-engine-okhttp/api/http-client-engine-okhttp.api

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ public final class aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngineConf
6969
public final fun getCertificatePinner ()Lokhttp3/CertificatePinner;
7070
public final fun getCipherSuites ()Ljava/util/List;
7171
public final fun getConnectionIdlePollingInterval-FghU774 ()Lkotlin/time/Duration;
72-
public final fun getExecutorService ()Ljava/util/concurrent/ExecutorService;
7372
public final fun getHostnameVerifier ()Ljavax/net/ssl/HostnameVerifier;
7473
public final fun getKeyManager ()Ljavax/net/ssl/KeyManager;
7574
public final fun getMaxConcurrencyPerHost-pVg5ArA ()I
@@ -84,7 +83,6 @@ public final class aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngineConf
8483
public final fun getCertificatePinner ()Lokhttp3/CertificatePinner;
8584
public final fun getCipherSuites ()Ljava/util/List;
8685
public final fun getConnectionIdlePollingInterval-FghU774 ()Lkotlin/time/Duration;
87-
public final fun getExecutorService ()Ljava/util/concurrent/ExecutorService;
8886
public final fun getHostnameVerifier ()Ljavax/net/ssl/HostnameVerifier;
8987
public final fun getKeyManager ()Ljavax/net/ssl/KeyManager;
9088
public final fun getMaxConcurrencyPerHost-0hXNFcg ()Lkotlin/UInt;
@@ -93,7 +91,6 @@ public final class aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngineConf
9391
public final fun setCertificatePinner (Lokhttp3/CertificatePinner;)V
9492
public final fun setCipherSuites (Ljava/util/List;)V
9593
public final fun setConnectionIdlePollingInterval-BwNAW2A (Lkotlin/time/Duration;)V
96-
public final fun setExecutorService (Ljava/util/concurrent/ExecutorService;)V
9794
public final fun setHostnameVerifier (Ljavax/net/ssl/HostnameVerifier;)V
9895
public final fun setKeyManager (Ljavax/net/ssl/KeyManager;)V
9996
public final fun setMaxConcurrencyPerHost-ExVfyTY (Lkotlin/UInt;)V

runtime/protocol/http-client-engines/http-client-engine-okhttp/jvm/src/aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngine.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public fun OkHttpEngineConfig.buildClient(
132132
)
133133
connectionPool(pool)
134134

135-
val dispatcher = (executorService?.let { Dispatcher(it) } ?: Dispatcher()).apply {
135+
val dispatcher = Dispatcher().apply {
136136
maxRequests = config.maxConcurrency.toInt()
137137
maxRequestsPerHost = config.maxConcurrencyPerHost.toInt()
138138
}

runtime/protocol/http-client-engines/http-client-engine-okhttp/jvm/src/aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngineConfig.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import aws.smithy.kotlin.runtime.http.engine.HttpClientEngineConfigImpl
1010
import aws.smithy.kotlin.runtime.telemetry.Global
1111
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
1212
import okhttp3.CertificatePinner
13-
import okhttp3.Dispatcher
14-
import java.util.concurrent.ExecutorService
1513
import javax.net.ssl.HostnameVerifier
1614
import javax.net.ssl.KeyManager
1715
import javax.net.ssl.X509TrustManager
@@ -89,13 +87,6 @@ public class OkHttpEngineConfig private constructor(builder: Builder) : HttpClie
8987
*/
9088
public val hostnameVerifier: HostnameVerifier? = builder.hostnameVerifier
9189

92-
/**
93-
* Which [ExecutorService] to use for the engine's [Dispatcher].
94-
* Use this to customize the engine's concurrency behavior, such as enabling use of virtual threads.
95-
* If you supply your own executor, it must be able to run [maxConcurrency] calls in parallel.
96-
*/
97-
public val executorService: ExecutorService? = builder.executorService
98-
9990
override fun toBuilderApplicator(): HttpClientEngineConfig.Builder.() -> Unit = {
10091
super.toBuilderApplicator()()
10192

@@ -168,13 +159,6 @@ public class OkHttpEngineConfig private constructor(builder: Builder) : HttpClie
168159
*/
169160
public var hostnameVerifier: HostnameVerifier? = null
170161

171-
/**
172-
* Which [ExecutorService] to use for the engine's [Dispatcher].
173-
* Use this to customize the engine's concurrency behavior, such as enabling use of virtual threads.
174-
* If you supply your own executor, it must be able to run [maxConcurrency] calls in parallel.
175-
*/
176-
public var executorService: ExecutorService? = null
177-
178162
override var telemetryProvider: TelemetryProvider = TelemetryProvider.Global
179163
}
180164
}

0 commit comments

Comments
 (0)