summaryrefslogtreecommitdiffstats
path: root/container-search/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-01-31 20:50:55 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-01-31 20:50:55 +0000
commitb3468dcd4f2185f82eeaceedc30c220cd96aaeb0 (patch)
tree36a2671e11d9e7b2f357337c5fdb6fed91fba6c5 /container-search/src
parent241612c73b9d9dd00fcf196d9be4bafccc1d305c (diff)
Add comment on semantics.
Diffstat (limited to 'container-search/src')
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java
index 1802d3907b4..82aa0a50e72 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java
@@ -29,7 +29,10 @@ public class Node {
this.group = group;
}
+ /** Only send ping if this method return true. If not the is a ping outstanding. */
public boolean sendPing() { return ! pendingPing.getAndSet(true); }
+
+ /** Need to be called when a pong is called to allow next ping to go through. */
public void receivePing() { pendingPing.set(false); }
/** Returns the unique and stable distribution key of this node */