Define DataStoreVersions.MAGNESIUM_VERSION
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / VersionedExternalizableMessage.java
index 622485b..f28250b 100644 (file)
@@ -37,8 +37,15 @@ 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.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;
+        } 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.