Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add more debug output in AbstractLeader and Follower
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
FollowerLogInformation.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java
b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java
index 07b6b617aaa862b472fb479be247479e1096f434..6618a97f21f0d1b7145abc77171a950d9bf9d1e8 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformation.java
@@
-14,13
+14,15
@@
public interface FollowerLogInformation {
/**
* Increment the value of the nextIndex
/**
* Increment the value of the nextIndex
- * @return
+ *
+ * @return the new value of nextIndex
*/
long incrNextIndex();
/**
* Decrement the value of the nextIndex
*/
long incrNextIndex();
/**
* Decrement the value of the nextIndex
- * @return
+ *
+ * @return the new value of nextIndex
*/
long decrNextIndex();
*/
long decrNextIndex();
@@
-35,7
+37,8
@@
public interface FollowerLogInformation {
/**
* Increment the value of the matchIndex
/**
* Increment the value of the matchIndex
- * @return
+ *
+ * @return the new value of matchIndex
*/
long incrMatchIndex();
*/
long incrMatchIndex();
@@
-49,28
+52,25
@@
public interface FollowerLogInformation {
boolean setMatchIndex(long matchIndex);
/**
boolean setMatchIndex(long matchIndex);
/**
- *
The identifier of the follower
- *
This could simply be the url of the remote actor
+ *
+ *
@return the identifier of the follower. This could simply be the url of the remote actor.
*/
String getId();
/**
*/
String getId();
/**
- * for each server, index of the next log entry
- * to send to that server (initialized to leader
- * last log index + 1)
+ * @return index of the next log entry to send to that server (initialized to leader last log index + 1)
*/
long getNextIndex();
/**
*/
long getNextIndex();
/**
- * for each server, index of highest log entry
- * known to be replicated on server
- * (initialized to 0, increases monotonically)
+ * @return index of highest log entry known to be replicated on server (initialized to 0, increases monotonically)
*/
long getMatchIndex();
/**
* Checks if the follower is active by comparing the last updated with the duration
*/
long getMatchIndex();
/**
* Checks if the follower is active by comparing the last updated with the duration
- * @return boolean
+ *
+ * @return true if follower is active, false otherwise
*/
boolean isFollowerActive();
*/
boolean isFollowerActive();
@@
-87,14
+87,25
@@
public interface FollowerLogInformation {
/**
* This will return the active time of follower, since it was last reset
/**
* This will return the active time of follower, since it was last reset
- * @return time in milliseconds
+ *
+ * @return time in milliseconds since the last activity from the follower
*/
long timeSinceLastActivity();
/**
* This method checks if it is ok to replicate
*
*/
long timeSinceLastActivity();
/**
* This method checks if it is ok to replicate
*
- * @return true if it is ok to replicate
+ * @return true if it is ok to replicate
, false otherwise
*/
boolean okToReplicate();
*/
boolean okToReplicate();
+
+ /**
+ * @return the payload data version of the follower.
+ */
+ short getPayloadVersion();
+
+ /**
+ * Sets the payload data version of the follower.
+ */
+ void setPayloadVersion(short payloadVersion);
}
}