Merge "BUG-2288: deprecate old binding Notification API elements"
[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
24     @ConstructorProperties({"id","nextIndex", "matchIndex", "isActive", "timeSinceLastActivity"})
25     public FollowerInfo(String id, long nextIndex, long matchIndex, boolean isActive, String timeSinceLastActivity) {
26         this.id = id;
27         this.nextIndex = nextIndex;
28         this.matchIndex = matchIndex;
29         this.isActive = isActive;
30         this.timeSinceLastActivity = timeSinceLastActivity;
31     }
32
33     public String getId() {
34         return id;
35     }
36
37     public long getNextIndex() {
38         return nextIndex;
39     }
40
41     public long getMatchIndex() {
42         return matchIndex;
43     }
44
45     public boolean isActive() {
46         return isActive;
47     }
48
49     public String getTimeSinceLastActivity() {
50         return timeSinceLastActivity;
51     }
52 }