X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FSnapshotState.java;h=acb6e01230ecd64b8b6625f3f1c54eae227bd629;hp=0a702741d8894ceb46386fba63d28ca39e1e51af;hb=73ab61a037dd2489600acbc1eaf6f9ee549c204a;hpb=2faf656bf68dd3843fd59520b27a7ec2abbdcc68 diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/SnapshotState.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/SnapshotState.java index 0a702741d8..acb6e01230 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/SnapshotState.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/SnapshotState.java @@ -46,6 +46,14 @@ public interface SnapshotState { */ boolean captureToInstall(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex, String targetFollower); + /** + * Initiates a capture snapshot, while enforcing trimming of the log up to lastAppliedIndex. + * @param lastLogEntry the last entry in the replicated log + * @param replicatedToAllIndex the current replicatedToAllIndex + * @return true if capture was started + */ + boolean captureWithForcedTrim(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex); + /** * Applies a snapshot on a follower that was installed by the leader. *