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;
18 public CaptureSnapshot(long lastIndex, long lastTerm,
19 long lastAppliedIndex, long lastAppliedTerm) {
20 this(lastIndex, lastTerm, lastAppliedIndex, lastAppliedTerm, false);
23 public CaptureSnapshot(long lastIndex, long lastTerm,long lastAppliedIndex,
24 long lastAppliedTerm, boolean installSnapshotInitiated) {
25 this.lastIndex = lastIndex;
26 this.lastTerm = lastTerm;
27 this.lastAppliedIndex = lastAppliedIndex;
28 this.lastAppliedTerm = lastAppliedTerm;
29 this.installSnapshotInitiated = installSnapshotInitiated;
32 public long getLastAppliedIndex() {
33 return lastAppliedIndex;
36 public long getLastAppliedTerm() {
37 return lastAppliedTerm;
40 public long getLastIndex() {
44 public long getLastTerm() {
48 public boolean isInstallSnapshotInitiated() {
49 return installSnapshotInitiated;