import java.io.Serializable;
-public class ElectionTimeout implements Serializable {
+/**
+ * Message sent to indicate the current election term has timed out.
+ */
+public final class ElectionTimeout implements Serializable {
private static final long serialVersionUID = 1L;
+ public static final ElectionTimeout INSTANCE = new ElectionTimeout();
+
+ private ElectionTimeout() {
+ // Hidden on purpose
+ }
+
+ @SuppressWarnings({ "static-method", "unused" })
+ private ElectionTimeout readResolve() {
+ return INSTANCE;
+ }
}