Bug 2538: Remove redundant Augmentation checks and tests
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / base / messages / CaptureSnapshot.java
1 /*
2  * Copyright (c) 2014 Cisco 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
9 package org.opendaylight.controller.cluster.raft.base.messages;
10
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
18     public CaptureSnapshot(long lastIndex, long lastTerm,
19         long lastAppliedIndex, long lastAppliedTerm) {
20         this(lastIndex, lastTerm, lastAppliedIndex, lastAppliedTerm, false);
21     }
22
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;
30     }
31
32     public long getLastAppliedIndex() {
33         return lastAppliedIndex;
34     }
35
36     public long getLastAppliedTerm() {
37         return lastAppliedTerm;
38     }
39
40     public long getLastIndex() {
41         return lastIndex;
42     }
43
44     public long getLastTerm() {
45         return lastTerm;
46     }
47
48     public boolean isInstallSnapshotInitiated() {
49         return installSnapshotInitiated;
50     }
51 }