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 java.io.Externalizable;
11 import java.io.IOException;
12 import java.io.ObjectInput;
13 import java.io.ObjectOutput;
14 import java.io.Serializable;
17 * Internal message that is stored in the akka's persistent journal to delete journal entries.
19 * @author Thomas Pantelis
21 public class DeleteEntries implements Serializable {
22 @Deprecated(since = "7.0.0", forRemoval = true)
23 private static final class Proxy implements Externalizable {
25 private static final long serialVersionUID = 1L;
27 private DeleteEntries deleteEntries;
29 // checkstyle flags the public modifier as redundant which really doesn't make sense since it clearly isn't
30 // redundant. It is explicitly needed for Java serialization to be able to create instances via reflection.
31 @SuppressWarnings("checkstyle:RedundantModifier")
36 Proxy(final DeleteEntries deleteEntries) {
37 this.deleteEntries = deleteEntries;
41 public void writeExternal(final ObjectOutput out) throws IOException {
42 out.writeLong(deleteEntries.fromIndex);
46 public void readExternal(final ObjectInput in) throws IOException {
47 deleteEntries = new DeleteEntries(in.readLong());
51 private Object readResolve() {
57 private static final long serialVersionUID = 1L;
59 private final long fromIndex;
61 public DeleteEntries(final long fromIndex) {
62 this.fromIndex = fromIndex;
65 public long getFromIndex() {
69 private Object writeReplace() {
74 public String toString() {
75 return "DeleteEntries [fromIndex=" + fromIndex + "]";