Merge "Added hosttracker shell for karaf (rebased)"
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / InstallSnapshot.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.messages;
10
11 public class InstallSnapshot extends AbstractRaftRPC {
12
13     private final String leaderId;
14     private final long lastIncludedIndex;
15     private final long lastIncludedTerm;
16     private final Object data;
17
18     public InstallSnapshot(long term, String leaderId, long lastIncludedIndex, long lastIncludedTerm, Object data) {
19         super(term);
20         this.leaderId = leaderId;
21         this.lastIncludedIndex = lastIncludedIndex;
22         this.lastIncludedTerm = lastIncludedTerm;
23         this.data = data;
24     }
25
26     public String getLeaderId() {
27         return leaderId;
28     }
29
30     public long getLastIncludedIndex() {
31         return lastIncludedIndex;
32     }
33
34     public long getLastIncludedTerm() {
35         return lastIncludedTerm;
36     }
37
38     public Object getData() {
39         return data;
40     }
41 }