X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FSnapshotState.java;h=9a9bf1c774a49c3a87cb285a599da382ecad9931;hb=f89552de4942d3709d6ee84415e672c6c7de489f;hp=2ff30ec53b24fd6c3664e23a591d574c93878fe7;hpb=c747a3f05a7f68f0e2e35720db8ffab6a59827fb;p=controller.git 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 2ff30ec53b..9a9bf1c774 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 @@ -24,16 +24,21 @@ public interface SnapshotState { * * @param lastLogEntry the last entry in the replicated log * @param replicatedToAllIndex the current replicatedToAllIndex + * + * @return true if capture was started */ - void capture(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex); + boolean capture(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex); /** * Initiate capture snapshot for the purposing of installing that snapshot * * @param lastLogEntry * @param replicatedToAllIndex + * @param targetFollower + * + * @return true if capture was started */ - void captureToInstall(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex); + boolean captureToInstall(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex, String targetFollower); /** * Create the snapshot @@ -48,8 +53,10 @@ public interface SnapshotState { * @param persistenceProvider * @param snapshotBytes * @param currentBehavior + * @param totalMemory */ - void persist(DataPersistenceProvider persistenceProvider, byte[] snapshotBytes, RaftActorBehavior currentBehavior); + void persist(DataPersistenceProvider persistenceProvider, byte[] snapshotBytes, RaftActorBehavior currentBehavior + ,long totalMemory); /** * Commit the snapshot by trimming the log @@ -70,5 +77,5 @@ public interface SnapshotState { * @param desiredTrimIndex * @return the actual trim index */ - long trimLog(long desiredTrimIndex); + long trimLog(long desiredTrimIndex, RaftActorBehavior currentBehavior); }