Improve segmented journal actor metrics
[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 akka.dispatch.ControlMessage;
13 import org.opendaylight.controller.cluster.raft.ReplicatedLogEntry;
14 import org.opendaylight.yangtools.concepts.Identifier;
15
16 /**
17  * Local message sent by a RaftActor to itself to signal state has been applied to the state machine.
18  */
19 public class ApplyState implements ControlMessage {
20     private final ActorRef clientActor;
21     private final Identifier identifier;
22     private final ReplicatedLogEntry replicatedLogEntry;
23
24     public ApplyState(ActorRef clientActor, Identifier identifier, ReplicatedLogEntry replicatedLogEntry) {
25         this.clientActor = clientActor;
26         this.identifier = identifier;
27         this.replicatedLogEntry = replicatedLogEntry;
28     }
29
30     public ActorRef getClientActor() {
31         return clientActor;
32     }
33
34     public Identifier getIdentifier() {
35         return identifier;
36     }
37
38     public ReplicatedLogEntry getReplicatedLogEntry() {
39         return replicatedLogEntry;
40     }
41
42     @Override
43     public String toString() {
44         return "ApplyState [identifier=" + identifier + ", replicatedLogEntry=" + replicatedLogEntry + "]";
45     }
46 }