2 * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.cluster.mgmt.api;
10 import static java.util.Objects.requireNonNull;
12 import javax.management.ConstructorParameters;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
16 * A bean class containing a snapshot of information for a follower returned from GetOnDemandRaftStats.
18 * @author Thomas Pantelis
21 public final class FollowerInfo {
22 private final String id;
23 private final long nextIndex;
24 private final long matchIndex;
25 private final boolean isActive;
26 private final String timeSinceLastActivity;
27 private final boolean isVoting;
29 @ConstructorParameters({"id","nextIndex", "matchIndex", "active", "timeSinceLastActivity", "voting"})
30 public FollowerInfo(final String id, final long nextIndex, final long matchIndex, final boolean active,
31 final String timeSinceLastActivity, final boolean voting) {
32 this.id = requireNonNull(id);
33 this.nextIndex = nextIndex;
34 this.matchIndex = matchIndex;
35 this.isActive = active;
36 this.timeSinceLastActivity = timeSinceLastActivity;
37 this.isVoting = voting;
40 public String getId() {
44 public long getNextIndex() {
48 public long getMatchIndex() {
52 public boolean isActive() {
56 public String getTimeSinceLastActivity() {
57 return timeSinceLastActivity;
60 public boolean isVoting() {