+ void updatePeerIds(ServerConfigurationPayload serverCfgPayload);
+
+ /**
+ * Returns the PeerInfo instances for each peer.
+ *
+ * @return list of PeerInfo
+ */
+ @Nonnull
+ Collection<PeerInfo> getPeers();
+
+ /**
+ * Returns the id's for each peer.
+ *
+ * @return the list of peer id's.
+ */
+ @Nonnull
+ Collection<String> getPeerIds();
+
+ /**
+ * Returns the PeerInfo for the given peer.
+ *
+ * @param peerId the id of the peer
+ * @return the PeerInfo or null if not found
+ */
+ @Nullable
+ PeerInfo getPeerInfo(String peerId);
+
+ /**
+ * Adds a new peer.
+ *
+ * @param id the id of the new peer.
+ * @param address the address of the new peer.
+ * @param votingState the VotingState of the new peer.
+ */
+ void addToPeers(String id, String address, VotingState votingState);
+
+ /**
+ * Removes a peer.
+ *
+ * @param id the id of the peer to remove.
+ */
+ void removePeer(String id);
+
+ /**
+ * Returns an ActorSelection for a peer.
+ *
+ * @param peerId the id of the peer.
+ * @return the actorSelection corresponding to the peer or null if the address has not yet been resolved.
+ */
+ @Nullable
+ ActorSelection getPeerActorSelection(String peerId);
+
+ /**
+ * Sets the address of a peer.
+ *
+ * @param peerId the id of the peer.
+ * @param peerAddress the address of the peer.
+ */
+ void setPeerAddress(String peerId, String peerAddress);
+
+ /**
+ * Returns the ConfigParams instance.
+ *
+ * @return the ConfigParams instance.
+ */
+ @Nonnull
+ ConfigParams getConfigParams();
+
+ /**
+ * Returns the SnapshotManager instance.
+ *
+ * @return the SnapshotManager instance.
+ */
+ @Nonnull
+ SnapshotManager getSnapshotManager();
+
+ /**
+ * Returns the DataPersistenceProvider instance.
+ *
+ * @return the DataPersistenceProvider instance.
+ */
+ @Nonnull
+ DataPersistenceProvider getPersistenceProvider();
+
+ /**
+ * Determines if there are any peer followers.
+ *
+ * @return true if there are followers otherwise false.
+ */
+ boolean hasFollowers();
+
+ /**
+ * Returns the total available memory for use in calculations. Normally this returns JVM's max memory but can be
+ * overridden for unit tests.
+ *
+ * @return the total memory.
+ */
+ long getTotalMemory();
+
+ /**
+ * Sets the retriever of the total memory metric.
+ *
+ * @param retriever a supplier of the total memory metric.
+ */
+ @VisibleForTesting
+ void setTotalMemoryRetriever(LongSupplier retriever);
+
+ /**
+ * Returns the payload version to be used when replicating data.
+ *
+ * @return the payload version.
+ */
+ short getPayloadVersion();
+
+ /**
+ * Returns the RaftPolicy used to determine certain Raft behaviors.
+ *
+ * @return the RaftPolicy instance.
+ */
+ @Nonnull
+ RaftPolicy getRaftPolicy();
+
+ /**
+ * Determines if there have been any dynamic server configuration changes applied.
+ *
+ * @return true if dynamic server configuration changes have been applied, false otherwise, meaning that static
+ * peer configuration is still in use.
+ */
+ boolean isDynamicServerConfigurationInUse();