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=0e1f20b24681ed6a0cd0644b513251114f225745;hb=664fc9940569ebfd54dcfc3db87bab66fad9300e;hp=7150ec0e6e8fd889f383a4aaace4b250a44061bc;hpb=fe4049d34de103016d11f3a9050853c6380646d3;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 7150ec0e6e..0e1f20b246 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 @@ -85,6 +85,12 @@ public interface RaftActorContext { */ void setLastApplied(long lastApplied); + /** + * + * @param replicatedLog + */ + void setReplicatedLog(ReplicatedLog replicatedLog); + /** * @return A representation of the log */ @@ -96,21 +102,27 @@ public interface RaftActorContext { ActorSystem getActorSystem(); /** + * Get the logger to be used for logging messages * * @return */ LoggingAdapter getLogger(); /** - * Get a mapping of peer id's their addresses + * Get a mapping of peerId's to their addresses + * * @return + * */ Map getPeerAddresses(); /** + * Get the address of the peer as a String. This is the same format in + * which a consumer would provide the address * * @param peerId - * @return + * @return The address of the peer or null if the address has not yet been + * resolved */ String getPeerAddress(String peerId); @@ -125,5 +137,38 @@ public interface RaftActorContext { * * @param name */ - public void removePeer(String name); + void removePeer(String name); + + /** + * Given a peerId return the corresponding actor + *

+ * + * + * @param peerId + * @return The actorSelection corresponding to the peer or null if the + * address has not yet been resolved + */ + ActorSelection getPeerActorSelection(String peerId); + + /** + * Set Peer Address can be called at a later time to change the address of + * a known peer. + * + *

+ * Throws an IllegalStateException if the peer is unknown + * + * @param peerId + * @param peerAddress + */ + void setPeerAddress(String peerId, String peerAddress); + + /** + * @return ConfigParams + */ + ConfigParams getConfigParams(); + + void setSnapshotCaptureInitiated(boolean snapshotCaptureInitiated); + + boolean isSnapshotCaptureInitiated(); + }