X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FRaftActorContext.java;h=c325875950169854685c2746178524155eb5f6fc;hb=9491b06df9419e58db3089a4c5cd9f5407cb9aac;hp=0c9d698cd5404f0675d11df935351df529b448f2;hpb=bba3a1aef6cf2852c0ad0f0b312f0aa351de3762;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContext.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContext.java index 0c9d698cd5..c325875950 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContext.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContext.java @@ -15,7 +15,6 @@ import akka.actor.Props; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Supplier; import java.util.Collection; -import java.util.Map; import org.opendaylight.controller.cluster.DataPersistenceProvider; import org.opendaylight.controller.cluster.raft.policy.RaftPolicy; import org.slf4j.Logger; @@ -103,12 +102,6 @@ public interface RaftActorContext { */ Logger getLogger(); - /** - * @return a copy of the mapping of peerId's to their addresses - * - */ - Map getPeerAddresses(); - /** * Get the address of the peer as a String. This is the same format in * which a consumer would provide the address @@ -119,18 +112,31 @@ public interface RaftActorContext { */ String getPeerAddress(String peerId); + /** + * @return list of PeerInfo + */ + Collection getPeers(); + /** * @return the list of peer IDs. */ Collection getPeerIds(); + /** + * Get the PeerInfo for the given peer. + * + * @param peerId + * @return the PeerInfo + */ + PeerInfo getPeerInfo(String peerId); + /** * Add to actor peers * * @param name * @param address */ - void addToPeers(String name, String address); + void addToPeers(String name, String address, VotingState votingState); /** *