aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-02-04 17:28:33 +0100
committerGitHub <noreply@github.com>2020-02-04 17:28:33 +0100
commit396a4dbfca5a6b81bd4c3608a0372afb9c084354 (patch)
tree00d8259806e5f89962378d17d01d949edbc9907f /container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java
parent7be078bc6c5a8c6624f615fffdb613cf2309387c (diff)
parent7e63c344b701067faabd0da99315399cd529eee7 (diff)
Merge pull request #12059 from vespa-engine/balder/explicit-control-of-monitor-thread-start
Do not start cluster monitor thread in test as it will race with expl…
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java b/container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java
index 9b20139e3c5..481f1e1b5a5 100644
--- a/container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java
+++ b/container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java
@@ -19,9 +19,21 @@ public interface NodeManager<T> {
/**
* Called when a node should be pinged.
- * This *must* lead to either a call to NodeMonitor.failed or NodeMonitor.responded
+ * This *must* lead to either a call to NodeMonitor.failed or NodeMonitor.responded
+ * @deprecated Use ping(ClusterMonitor clusterMonitor, T node, Executor executor) instead.
*/
- void ping(T node, Executor executor);
+ @Deprecated
+ default void ping(T node, Executor executor) {
+ throw new IllegalStateException("If you have not overrriden ping(ClusterMonitor<T> clusterMonitor, T node, Executor executor), you should at least have overriden this method.");
+ }
+
+ /**
+ * Called when a node should be pinged.
+ * This *must* lead to either a call to ClusterMonitor.failed or ClusterMonitor.responded
+ */
+ default void ping(ClusterMonitor<T> clusterMonitor, T node, Executor executor) {
+ ping(node, executor);
+ }
/** Called right after a ping has been issued to each node. This default implementation does nothing. */
default void pingIterationCompleted() {}