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=5d1304fe752222214a82b9d877da996dc517feb4;hp=3167596cc38ce56c55e67200531ce9afea93b49b;hb=b8c6400766f7324dd57d059bd48e435569fe1a27;hpb=55e018bfad0c70b773641142d6fbf009cd67fda4 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 3167596cc3..5d1304fe75 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 @@ -8,12 +8,11 @@ package org.opendaylight.controller.cluster.raft; -import org.opendaylight.controller.cluster.raft.behaviors.RaftActorBehavior; +import org.opendaylight.controller.cluster.raft.base.messages.ApplySnapshot; public interface SnapshotState { /** - * Should return true when a snapshot is being captured - * @return + * @return true when a snapshot is being captured */ boolean isCapturing(); @@ -43,7 +42,7 @@ public interface SnapshotState { * * @param snapshot the Snapshot to apply. */ - void apply(Snapshot snapshot); + void apply(ApplySnapshot snapshot); /** * Persist the snapshot @@ -52,14 +51,14 @@ public interface SnapshotState { * @param currentBehavior * @param totalMemory */ - void persist(byte[] snapshotBytes, RaftActorBehavior currentBehavior, long totalMemory); + void persist(byte[] snapshotBytes, long totalMemory); /** * Commit the snapshot by trimming the log * * @param sequenceNumber */ - void commit(long sequenceNumber, RaftActorBehavior currentBehavior); + void commit(long sequenceNumber); /** * Rollback the snapshot @@ -72,5 +71,5 @@ public interface SnapshotState { * @param desiredTrimIndex * @return the actual trim index */ - long trimLog(long desiredTrimIndex, RaftActorBehavior currentBehavior); + long trimLog(long desiredTrimIndex); }