package org.opendaylight.controller.cluster.raft.client.messages;
+import com.google.common.annotations.VisibleForTesting;
import java.io.Serializable;
-public class FindLeader implements Serializable{
+/**
+ * Request to locate the leader raft actor. Each {@link org.opendaylight.controller.cluster.raft.RaftActor} must
+ * respond with a {@link FindLeaderReply} containing the address of the leader, as it is known to that particular
+ * actor.
+ *
+ * This message is intended for testing purposes only.
+ */
+@VisibleForTesting
+public final class FindLeader implements Serializable {
private static final long serialVersionUID = 1L;
+ public static final FindLeader INSTANCE = new FindLeader();
+
+ private FindLeader() {
+ // Hidden to force reuse
+ }
+ private Object readResolve() {
+ return INSTANCE;
+ }
}