Fix incorrect readResolve signatures
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / client / messages / FindLeader.java
index a60aea46e82965d0ded03eb7464941bf1a62f4af..6080232538e22cd755807f449cbb84bbbfad4210 100644 (file)
@@ -8,6 +8,26 @@
 
 package org.opendaylight.controller.cluster.raft.client.messages;
 
-public class FindLeader {
+import com.google.common.annotations.VisibleForTesting;
+import java.io.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;
+    }
 }