Rename SODIUM versions to NEON_SR2 67/82867/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 28 Jun 2019 11:37:50 +0000 (13:37 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 1 Jul 2019 16:09:54 +0000 (16:09 +0000)
We are shipping these improvements in Neon SR2, which means we
should reserve this version not as Sodium.

Change-Id: If5caa0dd7510c6e1ffe3c483c74c456798ca6bb3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 files changed:
opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java
opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/Message.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputOutput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeStreamVersion.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/SodiumNormalizedNodeInputStreamReader.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/SodiumNormalizedNodeOutputStreamWriter.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/TokenTypes.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/VersionedNormalizedNodeDataInput.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataStoreVersions.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/VersionedExternalizableMessage.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/MetadataShardDataTreeSnapshot.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/PayloadVersion.java

index bbea1a9..e523cca 100644 (file)
@@ -53,12 +53,12 @@ public enum ABIVersion implements WritableObject {
 
     /**
      * Revised ABI version. The messages remain the same as {@link #BORON}, but messages bearing QNames in any shape
-     * are using {@link NormalizedNodeStreamVersion#SODIUM}, which improves encoding.
+     * are using {@link NormalizedNodeStreamVersion#NEON_SR2}, which improves encoding.
      */
-    SODIUM(6) {
+    NEON_SR2(6) {
         @Override
         public NormalizedNodeStreamVersion getStreamVersion() {
-            return NormalizedNodeStreamVersion.SODIUM;
+            return NormalizedNodeStreamVersion.NEON_SR2;
         }
     },
 
@@ -98,7 +98,7 @@ public enum ABIVersion implements WritableObject {
      * @return Current {@link ABIVersion}
      */
     public static @NonNull ABIVersion current() {
-        return SODIUM;
+        return NEON_SR2;
     }
 
     /**
@@ -121,9 +121,9 @@ public enum ABIVersion implements WritableObject {
             case 5:
                 return BORON;
             case 6:
-                return SODIUM;
+                return NEON_SR2;
             default:
-                throw new FutureVersionException(value, SODIUM);
+                throw new FutureVersionException(value, NEON_SR2);
         }
     }
 
index 252fe22..ed9d6c6 100644 (file)
@@ -112,7 +112,7 @@ public abstract class Message<T extends WritableIdentifier, C extends Message<T,
 
         switch (toVersion) {
             case BORON:
-            case SODIUM:
+            case NEON_SR2:
                 return verifyNotNull(cloneAsVersion(toVersion));
             case TEST_PAST_VERSION:
             case TEST_FUTURE_VERSION:
index bcb4cbf..f737618 100644 (file)
@@ -65,7 +65,7 @@ public final class NormalizedNodeInputOutput {
         switch (version) {
             case LITHIUM:
                 return new LithiumNormalizedNodeOutputStreamWriter(output);
-            case SODIUM:
+            case NEON_SR2:
                 return new SodiumNormalizedNodeOutputStreamWriter(output);
             default:
                 throw new IllegalStateException("Unhandled version " + version);
index 5fa9ce9..66405b1 100644 (file)
@@ -22,14 +22,14 @@ final class TokenTypes {
      * Revised stream version. Unlike {@link #LITHIUM_VERSION}, QNames and QNameModules are using a per-stream
      * dictionary, too.
      */
-    static final short SODIUM_VERSION = 2;
+    static final short NEON_SR2_VERSION = 2;
 
     // Tokens supported in LITHIUM_VERSION
     static final byte IS_CODE_VALUE = 1;
     static final byte IS_STRING_VALUE = 2;
     static final byte IS_NULL_VALUE = 3;
 
-    // Tokens supported in SODIUM_VERSION
+    // Tokens supported in NEON_SR2_VERSION
     static final byte IS_QNAME_CODE = 4;
     static final byte IS_QNAME_VALUE = 5;
     static final byte IS_AUGMENT_CODE = 6;
index 9e7bbdc..6691a2f 100644 (file)
@@ -37,7 +37,7 @@ final class VersionedNormalizedNodeDataInput extends ForwardingNormalizedNodeDat
             case TokenTypes.LITHIUM_VERSION:
                 ret = new LithiumNormalizedNodeInputStreamReader(input);
                 break;
-            case TokenTypes.SODIUM_VERSION:
+            case TokenTypes.NEON_SR2_VERSION:
                 ret = new SodiumNormalizedNodeInputStreamReader(input);
                 break;
             default:
index 742c31f..8e87079 100644 (file)
@@ -19,8 +19,8 @@ public final class DataStoreVersions {
     public static final short LITHIUM_VERSION = 3;
     public static final short BORON_VERSION = 5;
     public static final short FLUORINE_VERSION = 9;
-    public static final short SODIUM_VERSION = 10;
-    public static final short CURRENT_VERSION = SODIUM_VERSION;
+    public static final short NEON_SR2_VERSION = 10;
+    public static final short CURRENT_VERSION = NEON_SR2_VERSION;
 
     private DataStoreVersions() {
 
index 9eff5af..c809029 100644 (file)
@@ -37,8 +37,8 @@ public abstract class VersionedExternalizableMessage implements Externalizable,
     }
 
     protected final @NonNull NormalizedNodeStreamVersion getStreamVersion() {
-        return version < DataStoreVersions.SODIUM_VERSION
-                ? NormalizedNodeStreamVersion.LITHIUM : NormalizedNodeStreamVersion.SODIUM;
+        return version < DataStoreVersions.NEON_SR2_VERSION
+                ? NormalizedNodeStreamVersion.LITHIUM : NormalizedNodeStreamVersion.NEON_SR2;
     }
 
     @Override
index 21d018d..9e8c5f0 100644 (file)
@@ -32,7 +32,7 @@ abstract class AbstractVersionedShardDataTreeSnapshot extends ShardDataTreeSnaps
         switch (version) {
             case BORON:
                 return new ShardSnapshotState(readSnapshot(in), true);
-            case SODIUM:
+            case NEON_SR2:
                 return new ShardSnapshotState(readSnapshot(in), false);
             case TEST_FUTURE_VERSION:
             case TEST_PAST_VERSION:
@@ -75,7 +75,7 @@ abstract class AbstractVersionedShardDataTreeSnapshot extends ShardDataTreeSnaps
     private void versionedSerialize(final ObjectOutput out, final PayloadVersion version) throws IOException {
         switch (version) {
             case BORON:
-            case SODIUM:
+            case NEON_SR2:
                 // Boron and Sodium snapshots use Java Serialization, but differ in stream format
                 out.writeObject(this);
                 return;
index 154b89a..819ede7 100644 (file)
@@ -62,12 +62,12 @@ public enum PayloadVersion implements WritableObject {
 
     /**
      * Revised payload version. Payloads remain the same as {@link #BORON}, but messages bearing QNames in any shape
-     * are using {@link NormalizedNodeStreamVersion#SODIUM}, which improves encoding.
+     * are using {@link NormalizedNodeStreamVersion#NEON_SR2}, which improves encoding.
      */
-    SODIUM(6) {
+    NEON_SR2(6) {
         @Override
         public NormalizedNodeStreamVersion getStreamVersion() {
-            return NormalizedNodeStreamVersion.SODIUM;
+            return NormalizedNodeStreamVersion.NEON_SR2;
         }
     },
 
@@ -112,7 +112,7 @@ public enum PayloadVersion implements WritableObject {
      * @return Current {@link PayloadVersion}
      */
     public static @NonNull PayloadVersion current() {
-        return SODIUM;
+        return NEON_SR2;
     }
 
     /**
@@ -136,9 +136,9 @@ public enum PayloadVersion implements WritableObject {
             case 5:
                 return BORON;
             case 6:
-                return SODIUM;
+                return NEON_SR2;
             default:
-                throw new FutureVersionException(version, SODIUM);
+                throw new FutureVersionException(version, NEON_SR2);
         }
     }
 

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.