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 * @deprecated Use {@link org.opendaylight.controller.cluster.raft.persisted.ApplyJournalEntries} instead.
23 public class ApplyJournalEntries implements Serializable {
24 private static final long serialVersionUID = 1L;
26 private final long toIndex;
28 public ApplyJournalEntries(long toIndex) {
29 this.toIndex = toIndex;
32 public long getToIndex() {
36 private Object readResolve() {
37 return org.opendaylight.controller.cluster.raft.persisted.ApplyJournalEntries.createMigrated(toIndex);
41 public String toString() {
42 StringBuilder builder = new StringBuilder();
43 builder.append("ApplyJournalEntries [toIndex=").append(toIndex).append("]");
44 return builder.toString();