package org.opendaylight.controller.cluster.raft.persisted;
import akka.dispatch.ControlMessage;
-import java.io.Serializable;
import org.apache.commons.lang3.SerializationUtils;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.controller.cluster.raft.messages.Payload;
/**
* @author Thomas Pantelis
*/
public final class NoopPayload extends Payload implements ControlMessage {
- public static final NoopPayload INSTANCE = new NoopPayload();
-
- // There is no need for Externalizable
- @Deprecated(since = "7.0.0", forRemoval = true)
- private static final class Proxy implements Serializable {
- @java.io.Serial
- private static final long serialVersionUID = 1L;
-
- @java.io.Serial
- private Object readResolve() {
- return INSTANCE;
- }
- }
-
@java.io.Serial
private static final long serialVersionUID = 1L;
- private static final NP PROXY = new NP();
+ private static final @NonNull NP PROXY = new NP();
// Estimate to how big the proxy is. Note this includes object stream overhead, so it is a bit conservative
private static final int PROXY_SIZE = SerializationUtils.serialize(PROXY).length;
+ public static final @NonNull NoopPayload INSTANCE = new NoopPayload();
+
private NoopPayload() {
// Hidden on purpose
}