Switch to use PayloadVersion.CHLORINE_SR2 20/103520/6
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 2 Dec 2022 12:05:36 +0000 (13:05 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 2 Dec 2022 16:56:11 +0000 (17:56 +0100)
PayloadVersion.CHLORINE_SR2 is more efficient format, switch to using
it and deprecate old versions for removal.

JIRA: CONTROLLER-2056
Change-Id: Id05a34a28e4d3e817fc6ff783669493ee80af3b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
34 files changed:
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AT.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbortTransactionPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractIdentifiablePayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractVersionedShardDataTreeSnapshot.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/CH.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/CT.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/CloseLocalHistoryPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/CommitTransactionPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/CreateLocalHistoryPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/DH.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/DS.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/DSS.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/DT.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/DisableTrackingPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/FM.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/MS.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/PH.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/PT.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/PayloadVersion.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/PurgeLocalHistoryPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/PurgeTransactionPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/SM.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/SS.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/ST.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/ShardManagerSnapshot.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/ShardSnapshotState.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/SkipTransactionsPayload.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/AbortTransactionPayloadTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/CloseLocalHistoryPayloadTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/CommitTransactionPayloadTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/CreateLocalHistoryPayloadTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/PurgeLocalHistoryPayloadTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/PurgeTransactionPayloadTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/SkipTransactionsPayloadTest.java

index ddb9dc93e0feb22ac4933bcdad3790526d07563e..8002815c4ad72ad865152791a1f32fb78afe15cb 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifia
  * Serialization proxy for {@link AbortTransactionPayload}.
  */
 final class AT implements SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private TransactionIdentifier identifier;
index 793f2ea0628cdf967551eb90e6c87519dd62dd01..5f398853fe7a5561e2ce69bb8b60f360d8c14377 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.io.ByteStreams;
 import java.io.DataInput;
 import java.io.IOException;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -20,8 +21,20 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-public final class AbortTransactionPayload extends AbstractIdentifiablePayload<TransactionIdentifier> {
+public sealed class AbortTransactionPayload extends AbstractIdentifiablePayload<TransactionIdentifier> {
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class Magnesium extends AbortTransactionPayload implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final TransactionIdentifier transactionId, final byte[] serialized) {
+            super(transactionId, serialized);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy extends AbstractProxy<TransactionIdentifier> {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         // checkstyle flags the public modifier as redundant which really doesn't make sense since it clearly isn't
@@ -31,10 +44,6 @@ public final class AbortTransactionPayload extends AbstractIdentifiablePayload<T
             // For Externalizable
         }
 
-        Proxy(final byte[] serialized) {
-            super(serialized);
-        }
-
         @Override
         protected TransactionIdentifier readIdentifier(final DataInput in) throws IOException {
             return TransactionIdentifier.readFrom(in);
@@ -43,13 +52,14 @@ public final class AbortTransactionPayload extends AbstractIdentifiablePayload<T
         @Override
         protected AbortTransactionPayload createObject(final TransactionIdentifier identifier,
                 final byte[] serialized) {
-            return new AbortTransactionPayload(identifier, serialized);
+            return new Magnesium(identifier, serialized);
         }
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(AbortTransactionPayload.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
-    private static final int PROXY_SIZE = externalizableProxySize(Proxy::new);
+    private static final int PROXY_SIZE = externalizableProxySize(AT::new);
 
     AbortTransactionPayload(final TransactionIdentifier transactionId, final byte[] serialized) {
         super(transactionId, serialized);
@@ -69,8 +79,8 @@ public final class AbortTransactionPayload extends AbstractIdentifiablePayload<T
     }
 
     @Override
-    protected Proxy externalizableProxy(final byte[] serialized) {
-        return new Proxy(serialized);
+    protected AT externalizableProxy(final byte[] serialized) {
+        return new AT(serialized);
     }
 
     @Override
index 9bc5a319da2da9bde6385398f2f74329985ba723..3f142f569e3ca042cdc0ba97a7db61fc408a84e7 100644 (file)
@@ -50,6 +50,7 @@ public abstract class AbstractIdentifiablePayload<T extends Identifier> extends
          *
          * @return A payload.
          */
+        @java.io.Serial
         Object readResolve();
 
         /**
@@ -87,7 +88,9 @@ public abstract class AbstractIdentifiablePayload<T extends Identifier> extends
         }
     }
 
+    @Deprecated(since = "7.0.0", forRemoval = true)
     protected abstract static class AbstractProxy<T extends Identifier> implements SerialForm {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         private byte[] serialized;
@@ -162,15 +165,15 @@ public abstract class AbstractIdentifiablePayload<T extends Identifier> extends
     }
 
     @Override
-    protected final Object writeReplace() {
+    public final Object writeReplace() {
         return verifyNotNull(externalizableProxy(serialized));
     }
 
-    protected abstract @NonNull AbstractProxy<T> externalizableProxy(byte @NonNull[] serialized);
+    protected abstract @NonNull SerialForm externalizableProxy(byte @NonNull[] serialized);
 
     protected abstract int externalizableProxySize();
 
-    protected static final int externalizableProxySize(final Function<byte[], ? extends AbstractProxy<?>> constructor) {
+    protected static final int externalizableProxySize(final Function<byte[], ? extends SerialForm> constructor) {
         return SerializationUtils.serialize(constructor.apply(new byte[0])).length;
     }
 }
index be38f29b4493e57dcee559346226018191883039..2d36ead72723599fe9681943764a4302e35cb075 100644 (file)
@@ -32,8 +32,8 @@ abstract class AbstractVersionedShardDataTreeSnapshot extends ShardDataTreeSnaps
         final PayloadVersion version = PayloadVersion.readFrom(in);
         switch (version) {
             case SODIUM_SR1:
-                return new ShardSnapshotState(readSnapshot(in), true);
             case MAGNESIUM:
+                return new ShardSnapshotState(readSnapshot(in), true);
             case CHLORINE_SR2:
                 return new ShardSnapshotState(readSnapshot(in), false);
             case TEST_FUTURE_VERSION:
index b4e827b4030b5faf465e0a34bf9ffdfb118aeb71..a0af84139aa5f0b7c2ed25ed1cb093a5331d531e 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifia
  * Serialization proxy for {@link CreateLocalHistoryPayload}.
  */
 final class CH implements SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private LocalHistoryIdentifier identifier;
index 98c2562f0b67be435a803f7c6dca5f3feb77d73b..972ba1d0675f60728dee82d97dcb1ae152ecb4ad 100644 (file)
@@ -23,6 +23,7 @@ import org.opendaylight.controller.cluster.io.ChunkedByteArray;
  * Serialization proxy for {@link CommitTransactionPayload}.
  */
 final class CT implements Externalizable {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private CommitTransactionPayload payload;
index c5925136737c12d25e96e90d4af1e51e2518463c..ada468f31447936c18275e6f269bb246fccc1a9b 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.io.ByteStreams;
 import java.io.DataInput;
 import java.io.IOException;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -20,8 +21,20 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-public final class CloseLocalHistoryPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+public sealed class CloseLocalHistoryPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class Magnesium extends CloseLocalHistoryPayload implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final LocalHistoryIdentifier historyId, final byte[] serialized) {
+            super(historyId, serialized);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy extends AbstractProxy<LocalHistoryIdentifier> {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         // checkstyle flags the public modifier as redundant which really doesn't make sense since it clearly isn't
@@ -31,10 +44,6 @@ public final class CloseLocalHistoryPayload extends AbstractIdentifiablePayload<
             // For Externalizable
         }
 
-        Proxy(final byte[] serialized) {
-            super(serialized);
-        }
-
         @Override
         protected LocalHistoryIdentifier readIdentifier(final DataInput in) throws IOException {
             return LocalHistoryIdentifier.readFrom(in);
@@ -43,13 +52,14 @@ public final class CloseLocalHistoryPayload extends AbstractIdentifiablePayload<
         @Override
         protected CloseLocalHistoryPayload createObject(final LocalHistoryIdentifier identifier,
                 final byte[] serialized) {
-            return new CloseLocalHistoryPayload(identifier, serialized);
+            return new Magnesium(identifier, serialized);
         }
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(CloseLocalHistoryPayload.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
-    private static final int PROXY_SIZE = externalizableProxySize(Proxy::new);
+    private static final int PROXY_SIZE = externalizableProxySize(CH::new);
 
     CloseLocalHistoryPayload(final LocalHistoryIdentifier historyId, final byte[] serialized) {
         super(historyId, serialized);
@@ -69,8 +79,8 @@ public final class CloseLocalHistoryPayload extends AbstractIdentifiablePayload<
     }
 
     @Override
-    protected Proxy externalizableProxy(final byte[] serialized) {
-        return new Proxy(serialized);
+    protected DH externalizableProxy(final byte[] serialized) {
+        return new DH(serialized);
     }
 
     @Override
index cb261a2b19392da2373357383957a7f2cad4b4b5..4cbe151a6d8337f6f607ce26e3f6d087d2912148 100644 (file)
@@ -34,6 +34,7 @@ import org.opendaylight.controller.cluster.datastore.persisted.DataTreeCandidate
 import org.opendaylight.controller.cluster.io.ChunkedByteArray;
 import org.opendaylight.controller.cluster.io.ChunkedOutputStream;
 import org.opendaylight.controller.cluster.raft.messages.IdentifiablePayload;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.opendaylight.yangtools.concepts.Either;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.ReusableStreamReceiver;
 import org.opendaylight.yangtools.yang.data.impl.schema.ReusableImmutableNormalizedNodeStreamWriter;
@@ -149,11 +150,12 @@ public abstract sealed class CommitTransactionPayload extends IdentifiablePayloa
     abstract DataInput newDataInput();
 
     @Override
-    protected final Object writeReplace() {
-        return new Proxy(this);
+    public final Object writeReplace() {
+        return new CT(this);
     }
 
-    static final class Simple extends CommitTransactionPayload {
+    static sealed class Simple extends CommitTransactionPayload {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         private final byte[] serialized;
@@ -178,7 +180,8 @@ public abstract sealed class CommitTransactionPayload extends IdentifiablePayloa
         }
     }
 
-    static final class Chunked extends CommitTransactionPayload {
+    static sealed class Chunked extends CommitTransactionPayload {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "Handled via serialization proxy")
@@ -206,14 +209,36 @@ public abstract sealed class CommitTransactionPayload extends IdentifiablePayloa
 
     // Exists to break initialization dependency between CommitTransactionPayload/Simple/Proxy
     private static final class ProxySizeHolder {
-        static final int PROXY_SIZE = SerializationUtils.serialize(new Proxy(new Simple(new byte[0]))).length;
+        static final int PROXY_SIZE = SerializationUtils.serialize(new CT(new Simple(new byte[0]))).length;
 
         private ProxySizeHolder() {
             // Hidden on purpose
         }
     }
 
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class SimpleMagnesium extends Simple implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        SimpleMagnesium(final byte[] serialized) {
+            super(serialized);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class ChunkedMagnesium extends Chunked implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        ChunkedMagnesium(final ChunkedByteArray source) {
+            super(source);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy implements Externalizable {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         private CommitTransactionPayload payload;
@@ -243,12 +268,13 @@ public abstract sealed class CommitTransactionPayload extends IdentifiablePayloa
             } else if (length < MAX_ARRAY_SIZE) {
                 final byte[] serialized = new byte[length];
                 in.readFully(serialized);
-                payload = new Simple(serialized);
+                payload = new SimpleMagnesium(serialized);
             } else {
-                payload = new Chunked(ChunkedByteArray.readFrom(in, length, MAX_ARRAY_SIZE));
+                payload = new ChunkedMagnesium(ChunkedByteArray.readFrom(in, length, MAX_ARRAY_SIZE));
             }
         }
 
+        @java.io.Serial
         private Object readResolve() {
             return verifyNotNull(payload);
         }
index 65f0e5d0983a0c64f33dfbd8789b867808b53e8f..c0be9464085e2e162341c77f4343f94814161d61 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.io.ByteStreams;
 import java.io.DataInput;
 import java.io.IOException;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -20,8 +21,20 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-public final class CreateLocalHistoryPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+public sealed class CreateLocalHistoryPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class Magnesium extends CreateLocalHistoryPayload implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final LocalHistoryIdentifier historyId, final byte[] serialized) {
+            super(historyId, serialized);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy extends AbstractProxy<LocalHistoryIdentifier> {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         // checkstyle flags the public modifier as redundant which really doesn't make sense since it clearly isn't
@@ -31,10 +44,6 @@ public final class CreateLocalHistoryPayload extends AbstractIdentifiablePayload
             // For Externalizable
         }
 
-        Proxy(final byte[] serialized) {
-            super(serialized);
-        }
-
         @Override
         protected LocalHistoryIdentifier readIdentifier(final DataInput in) throws IOException {
             return LocalHistoryIdentifier.readFrom(in);
@@ -43,13 +52,14 @@ public final class CreateLocalHistoryPayload extends AbstractIdentifiablePayload
         @Override
         protected CreateLocalHistoryPayload createObject(final LocalHistoryIdentifier identifier,
                 final byte[] serialized) {
-            return new CreateLocalHistoryPayload(identifier, serialized);
+            return new Magnesium(identifier, serialized);
         }
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(CreateLocalHistoryPayload.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
-    private static final int PROXY_SIZE = externalizableProxySize(Proxy::new);
+    private static final int PROXY_SIZE = externalizableProxySize(CH::new);
 
     CreateLocalHistoryPayload(final LocalHistoryIdentifier historyId, final byte[] serialized) {
         super(historyId, serialized);
@@ -69,8 +79,8 @@ public final class CreateLocalHistoryPayload extends AbstractIdentifiablePayload
     }
 
     @Override
-    protected Proxy externalizableProxy(final byte[] serialized) {
-        return new Proxy(serialized);
+    protected CH externalizableProxy(final byte[] serialized) {
+        return new CH(serialized);
     }
 
     @Override
index a9c6c6349197e01b3a65dd9ae4fa363581e52b2c..4ce29b104218f802088873919a6a43e7273082eb 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifia
  * Serialization proxy for {@link CloseLocalHistoryPayload}.
  */
 final class DH implements SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private LocalHistoryIdentifier identifier;
index 5dc365483b835cf519c5e08e23825c0093ba33c9..894600adf15b7aeade75dbeacdb881268fbfe20e 100644 (file)
@@ -14,6 +14,7 @@ import static java.util.Objects.requireNonNull;
  * Serialization proxy for {@link DatastoreSnapshot}.
  */
 final class DS implements DatastoreSnapshot.SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private DatastoreSnapshot datastoreSnapshot;
index 074706b1ff362747f818026556c0ed4aaa6c3c5f..5d6ea922cc4a86824043689bc4d8bd482923b370 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.controller.cluster.raft.persisted.Snapshot;
  * Serialization proxy for {@link ShardDataTreeSnapshot}.
  */
 final class DSS implements ShardSnapshot.SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private ShardSnapshot shardSnapshot;
index 8a619f64fa6e31aeb7648d2538bd3511377065b9..cc1a9487efd5abdce6168d27473054f78ca3ad6c 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifia
  * Serialization proxy for {@link DisableTrackingPayload}.
  */
 final class DT implements SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private ClientIdentifier identifier;
index 318df05d92fce4bd55409007b362d1960b48eefd..b531174576cf9898328977c7de2b316fb7530a2b 100644 (file)
@@ -12,10 +12,22 @@ import com.google.common.io.ByteStreams;
 import java.io.DataInput;
 import java.io.IOException;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public final class DisableTrackingPayload extends AbstractIdentifiablePayload<ClientIdentifier> {
+public sealed class DisableTrackingPayload extends AbstractIdentifiablePayload<ClientIdentifier> {
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class Magnesium extends DisableTrackingPayload implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final ClientIdentifier clientId, final byte[] serialized) {
+            super(clientId, serialized);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy extends AbstractProxy<ClientIdentifier> {
         @java.io.Serial
         private static final long serialVersionUID = -5490519942445085251L;
@@ -25,10 +37,6 @@ public final class DisableTrackingPayload extends AbstractIdentifiablePayload<Cl
             // For Externalizable
         }
 
-        Proxy(final byte[] serialized) {
-            super(serialized);
-        }
-
         @Override
         protected ClientIdentifier readIdentifier(final DataInput in) throws IOException {
             return ClientIdentifier.readFrom(in);
@@ -37,13 +45,14 @@ public final class DisableTrackingPayload extends AbstractIdentifiablePayload<Cl
         @Override
         protected DisableTrackingPayload createObject(final ClientIdentifier identifier,
                 final byte[] serialized) {
-            return new DisableTrackingPayload(identifier, serialized);
+            return new Magnesium(identifier, serialized);
         }
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(DisableTrackingPayload.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
-    private static final int PROXY_SIZE = externalizableProxySize(Proxy::new);
+    private static final int PROXY_SIZE = externalizableProxySize(DT::new);
 
     DisableTrackingPayload(final ClientIdentifier clientId, final byte[] serialized) {
         super(clientId, serialized);
@@ -63,8 +72,8 @@ public final class DisableTrackingPayload extends AbstractIdentifiablePayload<Cl
     }
 
     @Override
-    protected Proxy externalizableProxy(final byte[] serialized) {
-        return new Proxy(serialized);
+    protected DT externalizableProxy(final byte[] serialized) {
+        return new DT(serialized);
     }
 
     @Override
index 5a432cc8ad0325afaa4e31c6064e230d00e64895..827a0cf965d77a57488e54231da6349f91a091b4 100644 (file)
@@ -18,6 +18,7 @@ import java.util.List;
  * Externalizable proxy for {@link FrontendShardDataTreeSnapshotMetadata}.
  */
 final class FM implements Externalizable {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private List<FrontendClientMetadata> clients;
@@ -49,6 +50,7 @@ final class FM implements Externalizable {
         clients = builder.build();
     }
 
+    @java.io.Serial
     private Object readResolve() {
         return new FrontendShardDataTreeSnapshotMetadata(clients);
     }
index 7246e503db608f32104c034eec7b0490a27effc7..94cd695c5c0a3d57b2104ee009e0893b85ec4319 100644 (file)
@@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory;
  */
 final class MS implements Externalizable {
     private static final Logger LOG = LoggerFactory.getLogger(MS.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private Map<Class<? extends ShardDataTreeSnapshotMetadata<?>>, ShardDataTreeSnapshotMetadata<?>> metadata;
@@ -77,6 +78,7 @@ final class MS implements Externalizable {
         rootNode = stream.readNormalizedNode();
     }
 
+    @java.io.Serial
     private Object readResolve() {
         return new MetadataShardDataTreeSnapshot(rootNode, metadata);
     }
index 028d1508dacc5bc98e0016eca4c32e3f4ab53386..dc95e31a4e4ffb3b3c1c98ec0dbc2cb87b60416d 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifia
  * Serialization proxy for {@link PurgeLocalHistoryPayload}.
  */
 final class PH implements SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private LocalHistoryIdentifier identifier;
index 23bd12b1fa378a05048b439808527272fb8b38bd..8ea773fb4873721fa2123dc78eefe9b4266fb8bd 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifia
  * Serialization proxy for {@link PurgeTransactionPayload}.
  */
 final class PT implements SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private TransactionIdentifier identifier;
index 4eb5ad6c3745b941e2484fa51d0bf719fd1845a8..14b8951806524d1bddb74cd653e5af12ef2f1db4 100644 (file)
@@ -53,6 +53,7 @@ public enum PayloadVersion implements WritableObject {
      * ABI version as shipped in Sodium SR1 Simultaneous Release. QName-bearing messages are using
      * {@link NormalizedNodeStreamVersion#SODIUM_SR1}, which improves encoding.
      */
+    @Deprecated(since = "7.0.0", forRemoval = true)
     SODIUM_SR1(7) {
         @Override
         public NormalizedNodeStreamVersion getStreamVersion() {
@@ -64,6 +65,7 @@ public enum PayloadVersion implements WritableObject {
      * Revised payload version. Payloads remain the same as {@link #SODIUM_SR1}, but messages bearing QNames in any
      * shape are using {@link NormalizedNodeStreamVersion#MAGNESIUM}, which improves encoding.
      */
+    @Deprecated(since = "7.0.0", forRemoval = true)
     MAGNESIUM(8) {
         @Override
         public NormalizedNodeStreamVersion getStreamVersion() {
@@ -123,7 +125,7 @@ public enum PayloadVersion implements WritableObject {
      * @return Current {@link PayloadVersion}
      */
     public static @NonNull PayloadVersion current() {
-        return MAGNESIUM;
+        return CHLORINE_SR2;
     }
 
     /**
index d440910943d213e57cd45037e29593bec864c130..a9e4557eced0c010e77a9821c76e7ddd0f1e2e95 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.io.ByteStreams;
 import java.io.DataInput;
 import java.io.IOException;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -21,8 +22,20 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-public final class PurgeLocalHistoryPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+public sealed class PurgeLocalHistoryPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class Magnesium extends PurgeLocalHistoryPayload implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final LocalHistoryIdentifier historyId, final byte[] serialized) {
+            super(historyId, serialized);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy extends AbstractProxy<LocalHistoryIdentifier> {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         // checkstyle flags the public modifier as redundant which really doesn't make sense since it clearly isn't
@@ -32,10 +45,6 @@ public final class PurgeLocalHistoryPayload extends AbstractIdentifiablePayload<
             // For Externalizable
         }
 
-        Proxy(final byte[] serialized) {
-            super(serialized);
-        }
-
         @Override
         protected LocalHistoryIdentifier readIdentifier(final DataInput in) throws IOException {
             return LocalHistoryIdentifier.readFrom(in);
@@ -44,13 +53,14 @@ public final class PurgeLocalHistoryPayload extends AbstractIdentifiablePayload<
         @Override
         protected PurgeLocalHistoryPayload createObject(final LocalHistoryIdentifier identifier,
                 final byte[] serialized) {
-            return new PurgeLocalHistoryPayload(identifier, serialized);
+            return new Magnesium(identifier, serialized);
         }
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(PurgeLocalHistoryPayload.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
-    private static final int PROXY_SIZE = externalizableProxySize(Proxy::new);
+    private static final int PROXY_SIZE = externalizableProxySize(PH::new);
 
     PurgeLocalHistoryPayload(final LocalHistoryIdentifier historyId, final byte[] serialized) {
         super(historyId, serialized);
@@ -70,8 +80,8 @@ public final class PurgeLocalHistoryPayload extends AbstractIdentifiablePayload<
     }
 
     @Override
-    protected Proxy externalizableProxy(final byte[] serialized) {
-        return new Proxy(serialized);
+    protected PH externalizableProxy(final byte[] serialized) {
+        return new PH(serialized);
     }
 
     @Override
index f3c094c0ddbbaabfbd56a722bf68c9e3bb5fb1b7..4d5d2d742c3974b3837a7928e9b1b4c8e85d3ab9 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.io.ByteStreams;
 import java.io.DataInput;
 import java.io.IOException;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -20,8 +21,20 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-public final class PurgeTransactionPayload extends AbstractIdentifiablePayload<TransactionIdentifier> {
+public sealed class PurgeTransactionPayload extends AbstractIdentifiablePayload<TransactionIdentifier> {
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class Magnesium extends PurgeTransactionPayload implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final TransactionIdentifier transactionId, final byte[] serialized) {
+            super(transactionId, serialized);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy extends AbstractProxy<TransactionIdentifier> {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         // checkstyle flags the public modifier as redundant which really doesn't make sense since it clearly isn't
@@ -31,10 +44,6 @@ public final class PurgeTransactionPayload extends AbstractIdentifiablePayload<T
             // For Externalizable
         }
 
-        Proxy(final byte[] serialized) {
-            super(serialized);
-        }
-
         @Override
         protected TransactionIdentifier readIdentifier(final DataInput in) throws IOException {
             return TransactionIdentifier.readFrom(in);
@@ -43,13 +52,14 @@ public final class PurgeTransactionPayload extends AbstractIdentifiablePayload<T
         @Override
         protected PurgeTransactionPayload createObject(final TransactionIdentifier identifier,
                 final byte[] serialized) {
-            return new PurgeTransactionPayload(identifier, serialized);
+            return new Magnesium(identifier, serialized);
         }
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(PurgeTransactionPayload.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
-    private static final int PROXY_SIZE = externalizableProxySize(Proxy::new);
+    private static final int PROXY_SIZE = externalizableProxySize(PT::new);
 
     PurgeTransactionPayload(final TransactionIdentifier transactionId, final byte[] serialized) {
         super(transactionId, serialized);
@@ -69,8 +79,8 @@ public final class PurgeTransactionPayload extends AbstractIdentifiablePayload<T
     }
 
     @Override
-    protected Proxy externalizableProxy(final byte[] serialized) {
-        return new Proxy(serialized);
+    protected PT externalizableProxy(final byte[] serialized) {
+        return new PT(serialized);
     }
 
     @Override
index 1e2cdc8da12eb8344e38b18d7389ecbaf1e830a5..07c33086bf3f85c59331bbe0ed058f888dd00d31 100644 (file)
@@ -16,6 +16,7 @@ import java.util.List;
  * Serialization proxy for {@link ShardManagerSnapshot}.
  */
 final class SM implements ShardManagerSnapshot.SerializedForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private ShardManagerSnapshot snapshot;
@@ -43,5 +44,4 @@ final class SM implements ShardManagerSnapshot.SerializedForm {
     public Object readResolve() {
         return verifyNotNull(snapshot);
     }
-
 }
index 13a8ac64fbd28e199ac7427f99506bcecb79c9bd..f816002c9a3cd42f52e92eb2e21a1383776b8941 100644 (file)
@@ -14,6 +14,7 @@ import static java.util.Objects.requireNonNull;
  * Serialization proxy for {@link ShardSnapshotState}.
  */
 final class SS implements ShardSnapshotState.SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private ShardSnapshotState snapshotState;
index 756a20bcd2a7542830276dc18ebf123108a99dc2..ef082c72a06a8d5baab399ab50d1b5d12c65c088 100644 (file)
@@ -20,6 +20,7 @@ import org.opendaylight.controller.cluster.datastore.utils.ImmutableUnsignedLong
  * Serialization proxy for {@link SkipTransactionsPayload}.
  */
 final class ST implements SerialForm {
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private ImmutableUnsignedLongSet transactionIds;
index 2e0320bbcd7785d3cdb5546d3098280cce9180f0..b211d1a54f77d95398bcef2d927bc6035ff75762 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.controller.cluster.datastore.persisted;
 
-import static com.google.common.base.Verify.verifyNotNull;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.collect.ImmutableList;
@@ -19,13 +18,14 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.controller.cluster.raft.persisted.MigratedSerializable;
 
 /**
  * Represents the persisted snapshot state for the ShardManager.
  *
  * @author Thomas Pantelis
  */
-public final class ShardManagerSnapshot implements Serializable {
+public sealed class ShardManagerSnapshot implements Serializable {
     interface SerializedForm extends Externalizable {
         /**
          * Return the serial form of this object contents, corresponding to {@link ShardManagerSnapshot#shardList}.
@@ -69,10 +69,27 @@ public final class ShardManagerSnapshot implements Serializable {
         }
     }
 
+    @Deprecated(since = "7.0.0", forRemoval = true)
+    private static final class Magnesium extends ShardManagerSnapshot implements MigratedSerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final List<String> shardList) {
+            super(shardList);
+        }
+
+        @Override
+        public boolean isMigrated() {
+            return true;
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy implements SerializedForm {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
-        private ShardManagerSnapshot snapshot;
+        private ShardManagerSnapshot snapshot = null;
 
         // 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.
@@ -81,10 +98,6 @@ public final class ShardManagerSnapshot implements Serializable {
             // For Externalizable
         }
 
-        Proxy(final ShardManagerSnapshot snapshot) {
-            this.snapshot = snapshot;
-        }
-
         @Override
         public List<String> shardNames() {
             return snapshot.getShardList();
@@ -97,10 +110,11 @@ public final class ShardManagerSnapshot implements Serializable {
 
         @Override
         public Object readResolve() {
-            return verifyNotNull(snapshot);
+            return new Magnesium(snapshot.getShardList());
         }
     }
 
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     private final List<String> shardList;
@@ -109,16 +123,17 @@ public final class ShardManagerSnapshot implements Serializable {
         this.shardList = ImmutableList.copyOf(shardList);
     }
 
-    public List<String> getShardList() {
+    public final List<String> getShardList() {
         return shardList;
     }
 
-    private Object writeReplace() {
-        return new Proxy(this);
+    @java.io.Serial
+    public final Object writeReplace() {
+        return new SM(this);
     }
 
     @Override
-    public String toString() {
+    public final String toString() {
         return "ShardManagerSnapshot [ShardList = " + shardList + " ]";
     }
 }
index 3f0b7486767adc76899b099f522eee3b41dc2715..90275c19a6ccd721d3ab38263b948d3e96225a09 100644 (file)
@@ -44,7 +44,9 @@ public final class ShardSnapshotState implements Snapshot.State {
         }
     }
 
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy implements SerialForm {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         private ShardSnapshotState snapshotState;
@@ -56,10 +58,6 @@ public final class ShardSnapshotState implements Snapshot.State {
             // For Externalizable
         }
 
-        Proxy(final ShardSnapshotState snapshotState) {
-            this.snapshotState = snapshotState;
-        }
-
         @Override
         public ShardSnapshotState snapshotState() {
             return snapshotState;
@@ -76,6 +74,7 @@ public final class ShardSnapshotState implements Snapshot.State {
         }
     }
 
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
 
     @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "This field is not Serializable but this class "
@@ -103,7 +102,8 @@ public final class ShardSnapshotState implements Snapshot.State {
         return migrated;
     }
 
+    @java.io.Serial
     private Object writeReplace() {
-        return new Proxy(this);
+        return new SS(this);
     }
 }
index a3f7af99f049ad654861cd9373b46e42012341d0..085774592b72a3d1c1888157a6b8f854e0c74609 100644 (file)
@@ -17,6 +17,7 @@ import java.io.IOException;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
 import org.opendaylight.controller.cluster.datastore.utils.ImmutableUnsignedLongSet;
+import org.opendaylight.controller.cluster.raft.persisted.LegacySerializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -25,8 +26,20 @@ import org.slf4j.LoggerFactory;
  * for other purposes. It contains a {@link LocalHistoryIdentifier} and a list of transaction identifiers within that
  * local history.
  */
-public final class SkipTransactionsPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+public sealed class SkipTransactionsPayload extends AbstractIdentifiablePayload<LocalHistoryIdentifier> {
+    private static final class Magnesium extends SkipTransactionsPayload implements LegacySerializable {
+        @java.io.Serial
+        private static final long serialVersionUID = 1L;
+
+        Magnesium(final LocalHistoryIdentifier historyId, final byte[] serialized,
+                final ImmutableUnsignedLongSet transactionIds) {
+            super(historyId, serialized, transactionIds);
+        }
+    }
+
+    @Deprecated(since = "7.0.0", forRemoval = true)
     private static final class Proxy extends AbstractProxy<LocalHistoryIdentifier> {
+        @java.io.Serial
         private static final long serialVersionUID = 1L;
 
         private ImmutableUnsignedLongSet transactionIds;
@@ -38,10 +51,6 @@ public final class SkipTransactionsPayload extends AbstractIdentifiablePayload<L
             // For Externalizable
         }
 
-        Proxy(final byte[] serialized) {
-            super(serialized);
-        }
-
         @Override
         protected LocalHistoryIdentifier readIdentifier(final DataInput in) throws IOException {
             final var id = LocalHistoryIdentifier.readFrom(in);
@@ -52,13 +61,14 @@ public final class SkipTransactionsPayload extends AbstractIdentifiablePayload<L
         @Override
         protected SkipTransactionsPayload createObject(final LocalHistoryIdentifier identifier,
                 final byte[] serialized) {
-            return new SkipTransactionsPayload(identifier, serialized, verifyNotNull(transactionIds));
+            return new Magnesium(identifier, serialized, verifyNotNull(transactionIds));
         }
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(SkipTransactionsPayload.class);
+    @java.io.Serial
     private static final long serialVersionUID = 1L;
-    private static final int PROXY_SIZE = externalizableProxySize(Proxy::new);
+    private static final int PROXY_SIZE = externalizableProxySize(ST::new);
 
     @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "Handled via externalizable proxy")
     private final @NonNull ImmutableUnsignedLongSet transactionIds;
@@ -89,8 +99,8 @@ public final class SkipTransactionsPayload extends AbstractIdentifiablePayload<L
     }
 
     @Override
-    protected Proxy externalizableProxy(final byte[] serialized) {
-        return new Proxy(serialized);
+    protected ST externalizableProxy(final byte[] serialized) {
+        return new ST(serialized);
     }
 
     @Override
index 895f458a34ad689f4fa970257ca6994544d09f06..62ec2d0c8a0b30116228d74fd07961d26ca1d54b 100644 (file)
@@ -9,6 +9,6 @@ package org.opendaylight.controller.cluster.datastore.persisted;
 
 public class AbortTransactionPayloadTest extends AbstractIdentifiablePayloadTest<AbortTransactionPayload> {
     public AbortTransactionPayloadTest() {
-        super(AbortTransactionPayload.create(newTransactionId(0), 512), 264);
+        super(AbortTransactionPayload.create(newTransactionId(0), 512), 125);
     }
 }
index d816979088701a994088cfcaf278f883d59c85ef..071914bfc90fda3150d447892a7dbb6261480218 100644 (file)
@@ -9,6 +9,6 @@ package org.opendaylight.controller.cluster.datastore.persisted;
 
 public class CloseLocalHistoryPayloadTest extends AbstractIdentifiablePayloadTest<CloseLocalHistoryPayload> {
     public CloseLocalHistoryPayloadTest() {
-        super(CloseLocalHistoryPayload.create(newHistoryId(0), 512), 264);
+        super(CloseLocalHistoryPayload.create(newHistoryId(0), 512), 124);
     }
 }
index c5b8bab0685cab108f721a6d9beb9b9b38f61ab2..6b2367458f6a0a33f709f9326a6613c64675e925 100644 (file)
@@ -108,7 +108,7 @@ public class CommitTransactionPayloadTest extends AbstractTest {
     public void testCandidateSerialization() throws IOException {
         final CommitTransactionPayload payload = CommitTransactionPayload.create(nextTransactionId(), candidate);
         assertEquals("payload size", 156, payload.size());
-        assertEquals("serialized size", 270, SerializationUtils.serialize(payload).length);
+        assertEquals("serialized size", 242, SerializationUtils.serialize(payload).length);
     }
 
     @Test
index 7c0891e6f5c77672513fe123168c51560c64d42f..83941812294831d9f9d0b3640d2b45149a790b12 100644 (file)
@@ -9,6 +9,6 @@ package org.opendaylight.controller.cluster.datastore.persisted;
 
 public class CreateLocalHistoryPayloadTest extends AbstractIdentifiablePayloadTest<CreateLocalHistoryPayload> {
     public CreateLocalHistoryPayloadTest() {
-        super(CreateLocalHistoryPayload.create(newHistoryId(0), 512), 265);
+        super(CreateLocalHistoryPayload.create(newHistoryId(0), 512), 124);
     }
 }
index 99c188ddd8838b2600bd18ad2b28bf0469b2c42b..cca22204133d02814328781e2cd8617a6e82b078 100644 (file)
@@ -9,6 +9,6 @@ package org.opendaylight.controller.cluster.datastore.persisted;
 
 public class PurgeLocalHistoryPayloadTest extends AbstractIdentifiablePayloadTest<PurgeLocalHistoryPayload> {
     public PurgeLocalHistoryPayloadTest() {
-        super(PurgeLocalHistoryPayload.create(newHistoryId(0), 512), 264);
+        super(PurgeLocalHistoryPayload.create(newHistoryId(0), 512), 124);
     }
 }
index fad6205e1669e326f4de389382996e01b7b3d832..cfae341829575c5bc9da1475ab1b714c7db9702a 100644 (file)
@@ -9,6 +9,6 @@ package org.opendaylight.controller.cluster.datastore.persisted;
 
 public class PurgeTransactionPayloadTest extends AbstractIdentifiablePayloadTest<PurgeTransactionPayload> {
     public PurgeTransactionPayloadTest() {
-        super(PurgeTransactionPayload.create(newTransactionId(0), 512), 264);
+        super(PurgeTransactionPayload.create(newTransactionId(0), 512), 125);
     }
 }
index 39df133c8a2a2c712df867a54d51ffdfd4c5a592..818c18908dd2863f1d7eb5c79720e7fda4e526e5 100644 (file)
@@ -11,6 +11,6 @@ import org.opendaylight.controller.cluster.datastore.utils.MutableUnsignedLongSe
 
 public class SkipTransactionsPayloadTest extends AbstractIdentifiablePayloadTest<SkipTransactionsPayload> {
     public SkipTransactionsPayloadTest() {
-        super(SkipTransactionsPayload.create(newHistoryId(0), MutableUnsignedLongSet.of(42).immutableCopy(), 512), 270);
+        super(SkipTransactionsPayload.create(newHistoryId(0), MutableUnsignedLongSet.of(42).immutableCopy(), 512), 131);
     }
 }