Bug 2948: Store DataPersistenceProvider in RaftActorContext
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorContext.java
index 0e1f20b24681ed6a0cd0644b513251114f225745..7198876ca685fbab60c7983df909c0f05551a0f9 100644 (file)
@@ -12,9 +12,11 @@ import akka.actor.ActorRef;
 import akka.actor.ActorSelection;
 import akka.actor.ActorSystem;
 import akka.actor.Props;
-import akka.event.LoggingAdapter;
-
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Supplier;
 import java.util.Map;
+import org.opendaylight.controller.cluster.DataPersistenceProvider;
+import org.slf4j.Logger;
 
 /**
  * The RaftActorContext contains that portion of the RaftActors state that
@@ -106,7 +108,7 @@ public interface RaftActorContext {
      *
      * @return
      */
-    LoggingAdapter getLogger();
+    Logger getLogger();
 
     /**
      * Get a mapping of peerId's to their addresses
@@ -167,8 +169,15 @@ public interface RaftActorContext {
      */
     ConfigParams getConfigParams();
 
-    void setSnapshotCaptureInitiated(boolean snapshotCaptureInitiated);
+    SnapshotManager getSnapshotManager();
+
+    DataPersistenceProvider getPersistenceProvider();
+
+    boolean hasFollowers();
+
+    long getTotalMemory();
 
-    boolean isSnapshotCaptureInitiated();
+    @VisibleForTesting
+    void setTotalMemoryRetriever(Supplier<Long> retriever);
 
 }