Define DataStoreVersions.SODIUM_SR1_VERSION 01/84701/3
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 25 Sep 2019 10:24:39 +0000 (12:24 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 25 Sep 2019 10:52:34 +0000 (12:52 +0200)
This adds Sodium SR1 version, which is using SodiumSR1 normalized
node stream.

JIRA: CONTROLLER-1919
Change-Id: Ic79940cd80dfa1e2844079bc3003ab815c586662
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 8e87079..a2c5117 100644 (file)
@@ -20,7 +20,8 @@ public final class DataStoreVersions {
     public static final short BORON_VERSION = 5;
     public static final short FLUORINE_VERSION = 9;
     public static final short NEON_SR2_VERSION = 10;
-    public static final short CURRENT_VERSION = NEON_SR2_VERSION;
+    public static final short SODIUM_SR1_VERSION = 11;
+    public static final short CURRENT_VERSION = SODIUM_SR1_VERSION;
 
     private DataStoreVersions() {
 
index 622485b..2c5a9bd 100644 (file)
@@ -37,8 +37,13 @@ public abstract class VersionedExternalizableMessage implements Externalizable,
     }
 
     protected final @NonNull NormalizedNodeStreamVersion getStreamVersion() {
-        return version < DataStoreVersions.NEON_SR2_VERSION
-                ? NormalizedNodeStreamVersion.LITHIUM : NormalizedNodeStreamVersion.NEON_SR2;
+        if (version >= DataStoreVersions.SODIUM_SR1_VERSION) {
+            return NormalizedNodeStreamVersion.SODIUM_SR1;
+        } else if (version == DataStoreVersions.NEON_SR2_VERSION) {
+            return NormalizedNodeStreamVersion.NEON_SR2;
+        } else {
+            return NormalizedNodeStreamVersion.LITHIUM;
+        }
     }
 
     @Override

©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.