2 * Copyright (c) 2014 Cisco 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
9 package org.opendaylight.controller.cluster.raft.base.messages;
11 public class CaptureSnapshot {
12 private long lastAppliedIndex;
13 private long lastAppliedTerm;
14 private long lastIndex;
15 private long lastTerm;
16 private boolean installSnapshotInitiated;
17 private long replicatedToAllIndex;
18 private long replicatedToAllTerm;
20 public CaptureSnapshot(long lastIndex, long lastTerm,
21 long lastAppliedIndex, long lastAppliedTerm, long replicatedToAllIndex, long replicatedToAllTerm) {
22 this(lastIndex, lastTerm, lastAppliedIndex, lastAppliedTerm, replicatedToAllIndex , replicatedToAllTerm, false);
25 public CaptureSnapshot(long lastIndex, long lastTerm,long lastAppliedIndex,
26 long lastAppliedTerm, long replicatedToAllIndex, long replicatedToAllTerm, boolean installSnapshotInitiated) {
27 this.lastIndex = lastIndex;
28 this.lastTerm = lastTerm;
29 this.lastAppliedIndex = lastAppliedIndex;
30 this.lastAppliedTerm = lastAppliedTerm;
31 this.installSnapshotInitiated = installSnapshotInitiated;
32 this.replicatedToAllIndex = replicatedToAllIndex;
33 this.replicatedToAllTerm = replicatedToAllTerm;
36 public long getLastAppliedIndex() {
37 return lastAppliedIndex;
40 public long getLastAppliedTerm() {
41 return lastAppliedTerm;
44 public long getLastIndex() {
48 public long getLastTerm() {
52 public boolean isInstallSnapshotInitiated() {
53 return installSnapshotInitiated;
56 public long getReplicatedToAllIndex() {
57 return replicatedToAllIndex;
60 public long getReplicatedToAllTerm() {
61 return replicatedToAllTerm;