+ /**
+ * 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();
+
+ /**
+ * Sets that dynamic server configuration changes have been applied.
+ */
+ void setDynamicServerConfigurationInUse();
+
+ /**
+ * Returns the peer information as a ServerConfigurationPayload if dynamic server configurations have been applied.
+ *
+ * @param includeSelf include this peer's info.
+ * @return the peer information as a ServerConfigurationPayload or null if no dynamic server configurations have
+ * been applied.
+ */
+ @Nullable
+ ServerConfigurationPayload getPeerServerInfo(boolean includeSelf);
+
+ /**
+ * Determines if this peer is a voting member of the cluster.
+ *
+ * @return true if this peer is a voting member, false otherwise.
+ */
+ boolean isVotingMember();
+
+ /**
+ * Determines if there are any voting peers.
+ *
+ * @return true if there are any voting peers, false otherwise.
+ */
+ boolean anyVotingPeers();
+
+ /**
+ * Returns the current behavior attached to the RaftActor.
+ *
+ * @return current behavior.
+ */
+ RaftActorBehavior getCurrentBehavior();
+
+ /**
+ * Returns the consumer of ApplyState operations. This is invoked by a behavior when a log entry needs to be
+ * applied to the state.
+ *
+ * @return the Consumer
+ */
+ Consumer<ApplyState> getApplyStateConsumer();
+
+ /**
+ * Creates a FileBackedOutputStream with a common configuration.
+ *
+ * @return a FileBackedOutputStream instance
+ */
+ @Nonnull
+ FileBackedOutputStream newFileBackedOutputStream();
+
+ /**
+ * Returns the RaftActorLeadershipTransferCohort if leadership transfer is in progress.
+ *
+ * @return the RaftActorLeadershipTransferCohort if leadership transfer is in progress, null otherwise
+ */
+ @Nullable
+ RaftActorLeadershipTransferCohort getRaftActorLeadershipTransferCohort();
+
+ /**
+ * Sets the RaftActorLeadershipTransferCohort for transferring leadership.
+ *
+ * @param leadershipTransferCohort the RaftActorLeadershipTransferCohort or null to clear the existing one
+ */
+ void setRaftActorLeadershipTransferCohort(@Nullable RaftActorLeadershipTransferCohort leadershipTransferCohort);