BUG-7033: Add batchHint flag to RaftActor#persistData
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / base / messages / Replicate.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 Replicate 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     private final boolean sendImmediate;
22
23     public Replicate(ActorRef clientActor, Identifier identifier, ReplicatedLogEntry replicatedLogEntry,
24             boolean sendImmediate) {
25         this.clientActor = clientActor;
26         this.identifier = identifier;
27         this.replicatedLogEntry = replicatedLogEntry;
28         this.sendImmediate = sendImmediate;
29     }
30
31     public ActorRef getClientActor() {
32         return clientActor;
33     }
34
35     public Identifier getIdentifier() {
36         return identifier;
37     }
38
39     public ReplicatedLogEntry getReplicatedLogEntry() {
40         return replicatedLogEntry;
41     }
42
43     public boolean isSendImmediate() {
44         return sendImmediate;
45     }
46 }