|
6 | 6 | import java.util.HashSet;
|
7 | 7 | import java.util.List;
|
8 | 8 | import java.util.Optional;
|
9 |
| -import info.unterrainer.server.overmindserver.baseobjects.LimitedExecutorService; |
| 9 | +import java.util.concurrent.ExecutorService; |
10 | 10 | import java.util.concurrent.LinkedBlockingQueue;
|
11 |
| -import java.util.concurrent.LimitedExecutorService; |
| 11 | +import java.util.concurrent.ThreadPoolExecutor; |
12 | 12 | import java.util.concurrent.TimeUnit;
|
13 | 13 |
|
14 | 14 | import org.eclipse.jetty.server.Server;
|
@@ -71,17 +71,17 @@ private HttpServer() {
|
71 | 71 |
|
72 | 72 | @Builder
|
73 | 73 | private HttpServer(final String configPrefix, final String applicationName, final ObjectMapper objectMapper,
|
74 |
| - final JsonMapper jsonMapper, final LimitedExecutorService executorService, final String... appVersionFqns) { |
| 74 | + final JsonMapper jsonMapper, final ExecutorService executorService, final String... appVersionFqns) { |
75 | 75 | config = HttpServerConfiguration.read(configPrefix);
|
76 | 76 | this.applicationName = applicationName;
|
77 | 77 | this.executorService = executorService;
|
78 | 78 | this.appVersionFqns = new ArrayList<>(List.of(Optional.ofNullable(appVersionFqns).orElse(new String[0])));
|
79 | 79 | if (!this.appVersionFqns.contains(VERSION_FQN))
|
80 | 80 | this.appVersionFqns.add(VERSION_FQN);
|
81 | 81 | if (executorService == null) {
|
82 |
| - this.executorService = new LimitedExecutorService(200, 200, 60L, TimeUnit.SECONDS, |
| 82 | + this.executorService = new ThreadPoolExecutor(200, 200, 60L, TimeUnit.SECONDS, |
83 | 83 | new LinkedBlockingQueue<Runnable>());
|
84 |
| - ((LimitedExecutorService) this.executorService).allowCoreThreadTimeOut(true); |
| 84 | + ((ThreadPoolExecutor) this.executorService).allowCoreThreadTimeOut(true); |
85 | 85 | }
|
86 | 86 | if (applicationName == null)
|
87 | 87 | throw new IllegalArgumentException("The application-name cannot be null");
|
|
0 commit comments