Merge "Removing { } from NormalizedNodeJsonBodyWriter"
[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     private long replicatedToAllIndex;
18     private long replicatedToAllTerm;
19
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);
23     }
24
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;
34     }
35
36     public long getLastAppliedIndex() {
37         return lastAppliedIndex;
38     }
39
40     public long getLastAppliedTerm() {
41         return lastAppliedTerm;
42     }
43
44     public long getLastIndex() {
45         return lastIndex;
46     }
47
48     public long getLastTerm() {
49         return lastTerm;
50     }
51
52     public boolean isInstallSnapshotInitiated() {
53         return installSnapshotInitiated;
54     }
55
56     public long getReplicatedToAllIndex() {
57         return replicatedToAllIndex;
58     }
59
60     public long getReplicatedToAllTerm() {
61         return replicatedToAllTerm;
62     }
63 }