Add voting state to shard mbean FollowerInfo
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / client / messages / FollowerInfo.java
index 5d2c56a..cb991e1 100644 (file)
@@ -20,14 +20,17 @@ public class FollowerInfo {
     private final long matchIndex;
     private final boolean isActive;
     private final String timeSinceLastActivity;
+    private final boolean isVoting;
 
-    @ConstructorProperties({"id","nextIndex", "matchIndex", "isActive", "timeSinceLastActivity"})
-    public FollowerInfo(String id, long nextIndex, long matchIndex, boolean isActive, String timeSinceLastActivity) {
+    @ConstructorProperties({"id","nextIndex", "matchIndex", "isActive", "timeSinceLastActivity", "isVoting"})
+    public FollowerInfo(String id, long nextIndex, long matchIndex, boolean isActive, String timeSinceLastActivity,
+            boolean isVoting) {
         this.id = id;
         this.nextIndex = nextIndex;
         this.matchIndex = matchIndex;
         this.isActive = isActive;
         this.timeSinceLastActivity = timeSinceLastActivity;
+        this.isVoting = isVoting;
     }
 
     public String getId() {
@@ -49,4 +52,8 @@ public class FollowerInfo {
     public String getTimeSinceLastActivity() {
         return timeSinceLastActivity;
     }
+
+    public boolean isVoting() {
+        return isVoting;
+    }
 }