import akka.actor.ActorSelection;
import akka.actor.ActorSystem;
import akka.actor.Props;
+import akka.event.LoggingAdapter;
-import java.util.concurrent.atomic.AtomicLong;
+import java.util.Map;
/**
* The RaftActorContext contains that portion of the RaftActors state that
* monotonically)
* @return
*/
- AtomicLong getCommitIndex();
+ long getCommitIndex();
+
+
+ /**
+ *
+ */
+ void setCommitIndex(long commitIndex);
/**
* index of highest log entry applied to state
* monotonically)
* @return
*/
- AtomicLong getLastApplied();
+ long getLastApplied();
+
+
+ /**
+ *
+ */
+ void setLastApplied(long lastApplied);
/**
* @return A representation of the log
* @return The ActorSystem associated with this context
*/
ActorSystem getActorSystem();
+
+ /**
+ *
+ * @return
+ */
+ LoggingAdapter getLogger();
+
+ /**
+ * Get a mapping of peer id's their addresses
+ * @return
+ */
+ Map<String, String> getPeerAddresses();
+
+ /**
+ *
+ * @param peerId
+ * @return
+ */
+ String getPeerAddress(String peerId);
+
+ /**
+ * Add to actor peers
+ * @param name
+ * @param address
+ */
+ void addToPeers(String name, String address);
+
+ /**
+ *
+ * @param name
+ */
+ public void removePeer(String name);
}