+
+ /**
+ * @return The ActorSystem associated with this context
+ */
+ ActorSystem getActorSystem();
+
+ /**
+ * @return the logger to be used for logging messages to a log file
+ */
+ Logger getLogger();
+
+ /**
+ * 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 The address of the peer or null if the address has not yet been
+ * resolved
+ */
+ String getPeerAddress(String peerId);
+
+ /**
+ * @param serverCfgPayload
+ */
+ void updatePeerIds(ServerConfigurationPayload serverCfgPayload);
+
+ /**
+ * @return list of PeerInfo
+ */
+ Collection<PeerInfo> getPeers();
+
+ /**
+ * @return the list of peer IDs.
+ */
+ Collection<String> 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, VotingState votingState);
+
+ /**
+ *
+ * @param name
+ */
+ void removePeer(String name);
+
+ /**
+ * Given a peerId return the corresponding actor
+ * <p>
+ *
+ *
+ * @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.
+ *
+ * <p>
+ * Throws an IllegalStateException if the peer is unknown
+ *
+ * @param peerId
+ * @param peerAddress
+ */
+ void setPeerAddress(String peerId, String peerAddress);
+
+ /**
+ * @return ConfigParams
+ */
+ ConfigParams getConfigParams();
+
+ /**
+ *
+ * @return the SnapshotManager for this RaftActor
+ */
+ SnapshotManager getSnapshotManager();
+
+ /**
+ *
+ * @return the DataPersistenceProvider for this RaftActor
+ */
+ DataPersistenceProvider getPersistenceProvider();
+
+ /**
+ *
+ * @return true if the RaftActor has followers else false
+ */
+ boolean hasFollowers();
+
+ /**
+ *
+ * @return the total memory used by the ReplicatedLog
+ */
+ long getTotalMemory();
+
+ /**
+ *
+ * @param retriever a supplier of the total memory metric
+ */
+ @VisibleForTesting
+ void setTotalMemoryRetriever(Supplier<Long> retriever);
+
+ /**
+ *
+ * @return the payload version to be used when replicating data
+ */
+ short getPayloadVersion();
+
+ /**
+ * @return an implementation of the RaftPolicy so that the Raft code can be adapted
+ */
+ RaftPolicy getRaftPolicy();
+
+ /**
+ * @return true if there are any dynamic server configuration changes available,
+ * false if static peer configurations are still in use
+ */
+ boolean isDynamicServerConfigurationInUse();
+
+ /**
+ * Configures the dynamic server configurations are avaialble for the RaftActor
+ */
+ void setDynamicServerConfigurationInUse();
+
+ /**
+ * @return the RaftActor's peer information as a ServerConfigurationPayload if the
+ * dynamic server configurations are available, otherwise returns null
+ */
+ @Nullable ServerConfigurationPayload getPeerServerInfo(boolean includeSelf);
+
+ /**
+ * @return true if this RaftActor is a voting member of the cluster, false otherwise.
+ */
+ boolean isVotingMember();
+
+ /**
+ * @return current behavior attached to the raft actor.
+ */
+ RaftActorBehavior getCurrentBehavior();