* @author Thomas Pantelis
*/
public final class SimpleReplicatedLogEntry implements ReplicatedLogEntry, Serializable {
+ @Deprecated(since = "7.0.0", forRemoval = true)
private static final class Proxy implements Externalizable {
+ @java.io.Serial
private static final long serialVersionUID = 1L;
private long index;
data = (Payload) in.readObject();
}
+ @java.io.Serial
private Object readResolve() {
return new SimpleReplicatedLogEntry(index, term, data);
}
}
+ @java.io.Serial
private static final long serialVersionUID = 1L;
- // 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(new Proxy()).length;
+ // 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(new LE((Void) null)).length;
private final long index;
private final long term;
}
private Object writeReplace() {
- return new Proxy(this);
+ return new LE(this);
}
@Override
if (this == obj) {
return true;
}
-
if (obj == null || getClass() != obj.getClass()) {
return false;
}
- SimpleReplicatedLogEntry other = (SimpleReplicatedLogEntry) obj;
+ var other = (SimpleReplicatedLogEntry) obj;
return index == other.index && term == other.term && payload.equals(other.payload);
}