2 * Copyright (c) 2016 Cisco 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.Serializable;
11 import org.eclipse.jdt.annotation.NonNull;
14 * Transitional marker interface for use with evolution of serializable classes held in persistence. This interface
15 * should be implemented by replacement classes for as long as the old classes are supported.
17 * @author Robert Varga
19 public interface MigratedSerializable extends Serializable {
21 * Return true if this object was created from a previous serialization format.
23 * @return true if this object was created from a previous serialization format, false otherwise.
28 * Return a serialization proxy. Implementations should not return this object, but rather use Externalizable
29 * proxy pattern so their serialization format is not tied to this interface.
31 * @return Serialization proxy.
33 @NonNull Object writeReplace();