2 * Copyright (c) 2016 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.persisted;
10 import akka.dispatch.ControlMessage;
11 import java.io.Serializable;
14 * This is an internal message that is stored in the akka's persistent journal. During recovery, this
15 * message is used to apply recovered journal entries to the state whose indexes range from the context's
16 * current lastApplied index to "toIndex" contained in the message. This message is sent internally from a
17 * behavior to the RaftActor to persist.
19 * @author Thomas Pantelis
21 public final class ApplyJournalEntries implements Serializable, ControlMessage {
23 private static final long serialVersionUID = 1L;
25 private final long toIndex;
27 public ApplyJournalEntries(final long toIndex) {
28 this.toIndex = toIndex;
31 public long getToIndex() {
36 public String toString() {
37 return "ApplyJournalEntries [toIndex=" + toIndex + "]";
41 private Object writeReplace() {