From 328d1b44d0287930c11cda57f46fb4888f7f2320 Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Thu, 21 Dec 2023 16:35:40 -0800 Subject: [PATCH] add setters for executors --- .../com/linkedin/d2/balancer/D2ClientBuilder.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/d2/src/main/java/com/linkedin/d2/balancer/D2ClientBuilder.java b/d2/src/main/java/com/linkedin/d2/balancer/D2ClientBuilder.java index fbb07fe9ee..d3183aea39 100644 --- a/d2/src/main/java/com/linkedin/d2/balancer/D2ClientBuilder.java +++ b/d2/src/main/java/com/linkedin/d2/balancer/D2ClientBuilder.java @@ -541,6 +541,18 @@ public D2ClientBuilder setWarmUpConcurrentRequests(int warmUpConcurrentRequests) return this; } + public D2ClientBuilder setStartUpExecutorService(ScheduledExecutorService executorService) + { + _config.startUpExecutorService = executorService; + return this; + } + + public D2ClientBuilder setIndisStartUpExecutorService(ScheduledExecutorService executorService) + { + _config.indisStartUpExecutorService = executorService; + return this; + } + public D2ClientBuilder setDownstreamServicesFetcher(DownstreamServicesFetcher downstreamServicesFetcher) { _config.downstreamServicesFetcher = downstreamServicesFetcher;