|
29 | 29 |
|
30 | 30 | import java.io.IOException;
|
31 | 31 | import java.util.concurrent.CompletableFuture;
|
32 |
| -import java.util.concurrent.ExecutorService; |
33 | 32 | import java.util.concurrent.TimeoutException;
|
34 | 33 | import java.util.function.Supplier;
|
35 | 34 |
|
@@ -146,11 +145,11 @@ public AMQCommand exnWrappingRpc(Method m)
|
146 | 145 | }
|
147 | 146 | }
|
148 | 147 |
|
149 |
| - public CompletableFuture<Command> exnWrappingAsyncRpc(Method m, ExecutorService executorService) |
| 148 | + public CompletableFuture<Command> exnWrappingAsyncRpc(Method m) |
150 | 149 | throws IOException
|
151 | 150 | {
|
152 | 151 | try {
|
153 |
| - return privateAsyncRpc(m, executorService); |
| 152 | + return privateAsyncRpc(m); |
154 | 153 | } catch (AlreadyClosedException ace) {
|
155 | 154 | // Do not wrap it since it means that connection/channel
|
156 | 155 | // was closed in some action in the past
|
@@ -205,8 +204,8 @@ public void enqueueRpc(RpcContinuation k)
|
205 | 204 | doEnqueueRpc(() -> new RpcContinuationRpcWrapper(k));
|
206 | 205 | }
|
207 | 206 |
|
208 |
| - public void enqueueAsyncRpc(Method method, CompletableFuture<Command> future, ExecutorService executorService) { |
209 |
| - doEnqueueRpc(() -> new CompletableFutureRpcWrapper(method, future, executorService)); |
| 207 | + public void enqueueAsyncRpc(Method method, CompletableFuture<Command> future) { |
| 208 | + doEnqueueRpc(() -> new CompletableFutureRpcWrapper(method, future)); |
210 | 209 | }
|
211 | 210 |
|
212 | 211 | private void doEnqueueRpc(Supplier<RpcWrapper> rpcWrapperSupplier) {
|
@@ -309,11 +308,11 @@ protected ChannelContinuationTimeoutException wrapTimeoutException(final Method
|
309 | 308 | return new ChannelContinuationTimeoutException(e, this, this._channelNumber, m);
|
310 | 309 | }
|
311 | 310 |
|
312 |
| - private CompletableFuture<Command> privateAsyncRpc(Method m, ExecutorService executorService) |
| 311 | + private CompletableFuture<Command> privateAsyncRpc(Method m) |
313 | 312 | throws IOException, ShutdownSignalException
|
314 | 313 | {
|
315 | 314 | CompletableFuture<Command> future = new CompletableFuture<>();
|
316 |
| - asyncRpc(m, future, executorService); |
| 315 | + asyncRpc(m, future); |
317 | 316 | return future;
|
318 | 317 | }
|
319 | 318 |
|
@@ -348,20 +347,20 @@ public void quiescingRpc(Method m, RpcContinuation k)
|
348 | 347 | }
|
349 | 348 | }
|
350 | 349 |
|
351 |
| - public void asyncRpc(Method m, CompletableFuture<Command> future, ExecutorService executorService) |
| 350 | + public void asyncRpc(Method m, CompletableFuture<Command> future) |
352 | 351 | throws IOException
|
353 | 352 | {
|
354 | 353 | synchronized (_channelMutex) {
|
355 | 354 | ensureIsOpen();
|
356 |
| - quiescingAsyncRpc(m, future, executorService); |
| 355 | + quiescingAsyncRpc(m, future); |
357 | 356 | }
|
358 | 357 | }
|
359 | 358 |
|
360 |
| - public void quiescingAsyncRpc(Method m, CompletableFuture<Command> future, ExecutorService executorService) |
| 359 | + public void quiescingAsyncRpc(Method m, CompletableFuture<Command> future) |
361 | 360 | throws IOException
|
362 | 361 | {
|
363 | 362 | synchronized (_channelMutex) {
|
364 |
| - enqueueAsyncRpc(m, future, executorService); |
| 363 | + enqueueAsyncRpc(m, future); |
365 | 364 | quiescingTransmit(m);
|
366 | 365 | }
|
367 | 366 | }
|
|
0 commit comments