2 * Copyright (c) 2015 Brocade Communications 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
8 package org.opendaylight.controller.cluster.raft.base.messages;
10 import java.io.Serializable;
13 * This is an internal message that is stored in the akka's persistent journal. During recovery, this
14 * message is used to apply recovered journal entries to the state whose indexes range from the context's
15 * current lastApplied index to "toIndex" contained in the message. This message is sent internally from a
16 * behavior to the RaftActor to persist.
18 * @author Thomas Pantelis
20 public class ApplyJournalEntries implements Serializable {
21 private static final long serialVersionUID = 1L;
23 private final long toIndex;
25 public ApplyJournalEntries(long toIndex) {
26 this.toIndex = toIndex;
29 public long getToIndex() {
34 public String toString() {
35 StringBuilder builder = new StringBuilder();
36 builder.append("ApplyJournalEntries [toIndex=").append(toIndex).append("]");
37 return builder.toString();