Force AbstractRaftRPC to use Externalizable proxy pattern
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / PeerAddressResolver.java
index 13bbda619b869774a7dc4899cd79876046263f33..ac9be2562d2f0cafef031466439899bac990995b 100644 (file)
@@ -7,19 +7,30 @@
  */
 package org.opendaylight.controller.cluster.raft;
 
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.Nullable;
 
 /**
  * Interface to resolve raft actor peer addresses.
  *
  * @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) {
+
+    }
 }