Bug 7391: Fix out-of-order LeaderStateChange events
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / base / messages / ApplyState.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 import akka.actor.ActorRef;
12 import java.io.Serializable;
13 import org.opendaylight.controller.cluster.raft.ReplicatedLogEntry;
14 import org.opendaylight.yangtools.concepts.Identifier;
15
16 public class ApplyState implements Serializable {
17     private static final long serialVersionUID = 1L;
18     private final ActorRef clientActor;
19     private final Identifier identifier;
20     private final ReplicatedLogEntry replicatedLogEntry;
21
22     public ApplyState(ActorRef clientActor, Identifier identifier, ReplicatedLogEntry replicatedLogEntry) {
23         this.clientActor = clientActor;
24         this.identifier = identifier;
25         this.replicatedLogEntry = replicatedLogEntry;
26     }
27
28     public ActorRef getClientActor() {
29         return clientActor;
30     }
31
32     public Identifier getIdentifier() {
33         return identifier;
34     }
35
36     public ReplicatedLogEntry getReplicatedLogEntry() {
37         return replicatedLogEntry;
38     }
39
40     @Override
41     public String toString() {
42         return "ApplyState [identifier=" + identifier + ", replicatedLogEntry=" + replicatedLogEntry + "]";
43     }
44 }