Define DataStoreVersions.MAGNESIUM_VERSION 03/84703/10
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 25 Sep 2019 10:38:17 +0000 (12:38 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 25 Sep 2019 15:39:32 +0000 (15:39 +0000)
This adds Magnesium version, which is using Magnesium normalized
node stream.

JIRA: CONTROLLER-1919
Change-Id: Icc1314d61e37b8a4bf2df759860b4d0bc170c90c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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

index 78039f6..40f06d1 100644 (file)
@@ -25,6 +25,7 @@ public final class DataStoreVersions {
     public static final short FLUORINE_VERSION = 9;
     public static final short NEON_SR2_VERSION = 10;
     public static final short SODIUM_SR1_VERSION = 11;
+    public static final short MAGNESIUM_VERSION = 12;
     public static final short CURRENT_VERSION = NEON_SR2_VERSION;
 
     private DataStoreVersions() {
index 2c5a9bd..f28250b 100644 (file)
@@ -37,7 +37,9 @@ public abstract class VersionedExternalizableMessage implements Externalizable,
     }
 
     protected final @NonNull NormalizedNodeStreamVersion getStreamVersion() {
-        if (version >= DataStoreVersions.SODIUM_SR1_VERSION) {
+        if (version >= DataStoreVersions.MAGNESIUM_VERSION) {
+            return NormalizedNodeStreamVersion.MAGNESIUM;
+        } else if (version == DataStoreVersions.SODIUM_SR1_VERSION) {
             return NormalizedNodeStreamVersion.SODIUM_SR1;
         } else if (version == DataStoreVersions.NEON_SR2_VERSION) {
             return NormalizedNodeStreamVersion.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.