From bd8ef0c6846c5b9ad1abda05c7b5fccea68db1f7 Mon Sep 17 00:00:00 2001 From: David Turner Date: Sat, 21 Aug 2021 10:41:55 +0100 Subject: [PATCH] Comment on NOT_SET --- .../elasticsearch/cluster/ClusterStatePublicationEvent.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/cluster/ClusterStatePublicationEvent.java b/server/src/main/java/org/elasticsearch/cluster/ClusterStatePublicationEvent.java index 0ff610410c9e0..e306787dfbb4a 100644 --- a/server/src/main/java/org/elasticsearch/cluster/ClusterStatePublicationEvent.java +++ b/server/src/main/java/org/elasticsearch/cluster/ClusterStatePublicationEvent.java @@ -14,6 +14,9 @@ */ public class ClusterStatePublicationEvent { + /** + * Sentinel value so that we can assert each field is set once and only once on each successful event, and at most once on each failure. + */ private static final long NOT_SET = -1L; private final String summary;