*/
package org.opendaylight.controller.cluster.raft.base.messages;
+import akka.dispatch.ControlMessage;
import java.io.Serializable;
/**
*
* @author Thomas Pantelis
*/
-public final class TimeoutNow implements Serializable {
+public final class TimeoutNow implements Serializable, ControlMessage {
private static final long serialVersionUID = 1L;
public static final TimeoutNow INSTANCE = new TimeoutNow();
// Hidden on purpose
}
- private Object readResolve() {
- return INSTANCE;
+ private Object writeReplace() {
+ return new Proxy();
+ }
+
+ private static class Proxy extends EmptyExternalizableProxy {
+ private static final long serialVersionUID = 1L;
+
+ // checkstyle flags the public modifier as redundant which really doesn't make sense since it clearly isn't
+ // redundant. It is explicitly needed for Java serialization to be able to create instances via reflection.
+ @SuppressWarnings("checkstyle:RedundantModifier")
+ public Proxy() {
+ super(INSTANCE);
+ }
}
}