Send leader's full address via AppendEntries
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / PeerAddressResolver.java
index 13bbda619b869774a7dc4899cd79876046263f33..c7d81570c41b3fd8eb3c7d6e39b77ae263d46d7d 100644 (file)
@@ -14,12 +14,22 @@ import javax.annotation.Nullable;
  *
  * @author Thomas Pantelis
  */
+@FunctionalInterface
 public interface PeerAddressResolver {
     /**
-     * Resolves a raft actor peer id to it's remote actor address.
+     * Resolves a raft actor peer id to its remote actor address.
      *
      * @param peerId the id of the peer to resolve
      * @return the peer's actor path string or null if not found
      */
     @Nullable String resolve(String peerId);
+
+    /**
+     * Sets the actor address for a raft peer.
+     *
+     * @param peerId the id of the peer
+     * @param address the peer's actor's address
+     */
+    default void setResolved(String peerId, String address) {
+    }
 }