28f0f6b52b1d356de1f1d66d28cc38ef6981a25a
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / AppendEntriesReply.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 /**
12  * Reply for the AppendEntriesRpc message
13  */
14 public class AppendEntriesReply extends AbstractRaftRPC{
15
16     // true if follower contained entry matching
17     // prevLogIndex and prevLogTerm
18     private final boolean success;
19
20     public AppendEntriesReply(long term, boolean success) {
21         super(term);
22         this.success = success;
23     }
24
25     public long getTerm() {
26         return term;
27     }
28
29     public boolean isSuccess() {
30         return success;
31     }
32 }