2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.cluster.raft.base.messages;
11 import akka.actor.ActorRef;
12 import java.io.Serializable;
13 import org.opendaylight.controller.cluster.raft.ReplicatedLogEntry;
15 public class ApplyState implements Serializable {
16 private static final long serialVersionUID = 1L;
17 private final ActorRef clientActor;
18 private final String identifier;
19 private final ReplicatedLogEntry replicatedLogEntry;
20 private final long startTime;
22 public ApplyState(ActorRef clientActor, String identifier,
23 ReplicatedLogEntry replicatedLogEntry) {
24 this.clientActor = clientActor;
25 this.identifier = identifier;
26 this.replicatedLogEntry = replicatedLogEntry;
27 this.startTime = System.nanoTime();
30 public ActorRef getClientActor() {
34 public String getIdentifier() {
38 public ReplicatedLogEntry getReplicatedLogEntry() {
39 return replicatedLogEntry;
42 public long getStartTime() {
47 public String toString() {
48 return "ApplyState{" +
49 "identifier='" + identifier + '\'' +
50 ", replicatedLogEntry.index =" + replicatedLogEntry.getIndex() +
51 ", startTime=" + startTime +