Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Hide IsolatedLeaderCheck message
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
SnapshotState.java
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 9a9bf1c774a49c3a87cb285a599da382ecad9931..f5a175f3891de08defa6a0a7cefccf816fbf8213 100644
(file)
--- 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,14
+8,12
@@
package org.opendaylight.controller.cluster.raft;
package org.opendaylight.controller.cluster.raft;
-import akka.japi.Procedure;
-import org.opendaylight.controller.cluster.DataPersistenceProvider;
+import org.opendaylight.controller.cluster.raft.base.messages.ApplySnapshot;
import org.opendaylight.controller.cluster.raft.behaviors.RaftActorBehavior;
public interface SnapshotState {
/**
import org.opendaylight.controller.cluster.raft.behaviors.RaftActorBehavior;
public interface SnapshotState {
/**
- * Should return true when a snapshot is being captured
- * @return
+ * @return true when a snapshot is being captured
*/
boolean isCapturing();
*/
boolean isCapturing();
@@
-41,30
+39,27
@@
public interface SnapshotState {
boolean captureToInstall(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex, String targetFollower);
/**
boolean captureToInstall(ReplicatedLogEntry lastLogEntry, long replicatedToAllIndex, String targetFollower);
/**
- *
Create the snapshot
+ *
Applies a snapshot on a follower that was installed by the leader.
*
*
- * @param
callback a procedure to be called which should create the snapshot
+ * @param
snapshot the Snapshot to apply.
*/
*/
- void
create(Procedure<Void> callback
);
+ void
apply(ApplySnapshot snapshot
);
/**
* Persist the snapshot
*
/**
* Persist the snapshot
*
- * @param persistenceProvider
* @param snapshotBytes
* @param currentBehavior
* @param totalMemory
*/
* @param snapshotBytes
* @param currentBehavior
* @param totalMemory
*/
- void persist(DataPersistenceProvider persistenceProvider, byte[] snapshotBytes, RaftActorBehavior currentBehavior
- ,long totalMemory);
+ void persist(byte[] snapshotBytes, RaftActorBehavior currentBehavior, long totalMemory);
/**
* Commit the snapshot by trimming the log
*
/**
* Commit the snapshot by trimming the log
*
- * @param persistenceProvider
* @param sequenceNumber
*/
* @param sequenceNumber
*/
- void commit(
DataPersistenceProvider persistenceProvider, long sequenceNumbe
r);
+ void commit(
long sequenceNumber, RaftActorBehavior currentBehavio
r);
/**
* Rollback the snapshot
/**
* Rollback the snapshot