Add direct in-memory journal threshold
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / client / messages / FollowerInfo.java
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.raft.client.messages;
9
10 import java.beans.ConstructorProperties;
11
12 /**
13  * A bean class containing a snapshot of information for a follower returned from GetOnDemandRaftStats.
14  *
15  * @author Thomas Pantelis
16  */
17 public class FollowerInfo {
18     private final String id;
19     private final long nextIndex;
20     private final long matchIndex;
21     private final boolean isActive;
22     private final String timeSinceLastActivity;
23     private final boolean isVoting;
24
25     @ConstructorProperties({"id","nextIndex", "matchIndex", "active", "timeSinceLastActivity", "voting"})
26     public FollowerInfo(String id, long nextIndex, long matchIndex, boolean active, String timeSinceLastActivity,
27             boolean voting) {
28         this.id = id;
29         this.nextIndex = nextIndex;
30         this.matchIndex = matchIndex;
31         this.isActive = active;
32         this.timeSinceLastActivity = timeSinceLastActivity;
33         this.isVoting = voting;
34     }
35
36     public String getId() {
37         return id;
38     }
39
40     public long getNextIndex() {
41         return nextIndex;
42     }
43
44     public long getMatchIndex() {
45         return matchIndex;
46     }
47
48     public boolean isActive() {
49         return isActive;
50     }
51
52     public String getTimeSinceLastActivity() {
53         return timeSinceLastActivity;
54     }
55
56     public boolean isVoting() {
57         return isVoting;
58     }
59 }