Bug 7521: Add FileBackedOutputStream and use for snapshot chunking
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorContext.java
index 74a214f90ae14715c8053b2c9dcec204c6b2b80b..1d59ed1f85da6b5d572d71bbe550ac608eea2ec0 100644 (file)
@@ -21,6 +21,7 @@ import java.util.function.LongSupplier;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.opendaylight.controller.cluster.DataPersistenceProvider;
+import org.opendaylight.controller.cluster.io.FileBackedOutputStream;
 import org.opendaylight.controller.cluster.raft.base.messages.ApplyState;
 import org.opendaylight.controller.cluster.raft.behaviors.RaftActorBehavior;
 import org.opendaylight.controller.cluster.raft.persisted.ServerConfigurationPayload;
@@ -326,4 +327,12 @@ public interface RaftActorContext {
      * @return the Consumer
      */
     Consumer<ApplyState> getApplyStateConsumer();
+
+    /**
+     * Creates a FileBackedOutputStream with a common configuration.
+     *
+     * @return a FileBackedOutputStream instance
+     */
+    @Nonnull
+    FileBackedOutputStream newFileBackedOutputStream();
 }