diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-13 23:04:07 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-14 07:27:23 +0200 |
commit | bb54881376421e09daa8287173e06458b0c1f45a (patch) | |
tree | ec65a19ce5ad918fa181c9d76b3664f3390d9a80 /container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java | |
parent | 04c3414342c1cc296f8a56d4112f77b1a463cc70 (diff) |
Factor out timeout and coverage handling to make the InterleavedSearchInvoker easier to understand and modify.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java b/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java index eb379a51ed4..b0505fc5517 100644 --- a/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java +++ b/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java @@ -1,6 +1,8 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.dispatch; +import com.yahoo.concurrent.MonotonicTimer; +import com.yahoo.concurrent.Timer; import com.yahoo.prelude.fastsearch.VespaBackEndSearcher; import com.yahoo.search.Query; import com.yahoo.search.Result; @@ -22,6 +24,7 @@ import java.util.Set; public abstract class InvokerFactory { protected final SearchCluster searchCluster; + private static final Timer timer = new MonotonicTimer(); public InvokerFactory(SearchCluster searchCluster) { this.searchCluster = searchCluster; @@ -89,7 +92,7 @@ public abstract class InvokerFactory { if (invokers.size() == 1 && failed == null) { return Optional.of(invokers.get(0)); } else { - return Optional.of(new InterleavedSearchInvoker(invokers, searchCluster, group, failed)); + return Optional.of(new InterleavedSearchInvoker(timer, invokers, searchCluster, group, failed)); } } |