Take snapshot after recovery on migrated messages
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / base / messages / DeleteEntries.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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 package org.opendaylight.controller.cluster.raft.base.messages;
9
10 import java.io.Serializable;
11
12 /**
13  * Internal message that is stored in the akka's persistent journal to delete journal entries.
14  *
15  * @author Thomas Pantelis
16  *
17  * @deprecated Use {@link org.opendaylight.controller.cluster.raft.persisted.DeleteEntries} instead.
18  */
19 @Deprecated
20 public class DeleteEntries implements Serializable {
21     private static final long serialVersionUID = 1L;
22
23     private final long fromIndex;
24
25     public DeleteEntries(long fromIndex) {
26         this.fromIndex = fromIndex;
27     }
28
29     public long getFromIndex() {
30         return fromIndex;
31     }
32
33     private Object readResolve() {
34         return org.opendaylight.controller.cluster.raft.persisted.DeleteEntries.createMigrated(fromIndex);
35     }
36
37     @Override
38     public String toString() {
39         StringBuilder builder = new StringBuilder();
40         builder.append("DeleteEntries [fromIndex=").append(fromIndex).append("]");
41         return builder.toString();
42     }
43 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.