Prune old ABI versions
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / ABIVersion.java
index 6c03e5f1713f9fb8716514125944540f6851459c..1ff961f26cfbd8854abd7d335bece6c5f0c235f8 100644 (file)
@@ -36,48 +36,12 @@ public enum ABIVersion implements WritableObject {
         }
     },
 
+    // BORON was 5
+    // NEON_SR2 was 6
+    // SODIUM_SR1 was 7
     /**
-     * Initial ABI version, as shipped with Boron Simultaneous release.
-     *
-     * @deprecated This version scheduled for removal in the next major release.
-     */
-    // We seed the initial version to be the same as DataStoreVersions.BORON-VERSION for compatibility reasons.
-    @Deprecated(since = "6.0.4", forRemoval = true)
-    BORON(5) {
-        @Override
-        public NormalizedNodeStreamVersion getStreamVersion() {
-            return NormalizedNodeStreamVersion.LITHIUM;
-        }
-    },
-    /**
-     * Revised ABI version. The messages remain the same as {@link #BORON}, but messages bearing QNames in any shape
-     * are using {@link NormalizedNodeStreamVersion#NEON_SR2}, which improves encoding.
-     *
-     * @deprecated This version scheduled for removal in the next major release.
-     */
-    @Deprecated(since = "6.0.4", forRemoval = true)
-    NEON_SR2(6) {
-        @Override
-        public NormalizedNodeStreamVersion getStreamVersion() {
-            return NormalizedNodeStreamVersion.NEON_SR2;
-        }
-    },
-    /**
-     * Revised ABI version. The messages remain the same as {@link #BORON}, but messages bearing QNames in any shape
-     * are using {@link NormalizedNodeStreamVersion#SODIUM_SR1}, which improves encoding.
-     *
-     * @deprecated This version scheduled for removal in the next major release.
-     */
-    @Deprecated(since = "6.0.4", forRemoval = true)
-    SODIUM_SR1(7) {
-        @Override
-        public NormalizedNodeStreamVersion getStreamVersion() {
-            return NormalizedNodeStreamVersion.SODIUM_SR1;
-        }
-    },
-    /**
-     * Revised ABI version. The messages remain the same as {@link #BORON}, but messages bearing QNames in any shape
-     * are using {@link NormalizedNodeStreamVersion#MAGNESIUM}, which improves encoding.
+     * Oldest ABI version we support. The messages remain the same as {@code BORON}, but messages bearing QNames in any
+     * shape are using {@link NormalizedNodeStreamVersion#MAGNESIUM}, which improves encoding.
      */
     MAGNESIUM(8) {
         @Override
@@ -146,10 +110,7 @@ public enum ABIVersion implements WritableObject {
      */
     public static @NonNull ABIVersion valueOf(final short value) throws FutureVersionException, PastVersionException {
         return switch (Short.toUnsignedInt(value)) {
-            case 0, 1, 2, 3, 4 -> throw new PastVersionException(value, BORON);
-            case 5 -> BORON;
-            case 6 -> NEON_SR2;
-            case 7 -> SODIUM_SR1;
+            case 0, 1, 2, 3, 4, 6, 7 -> throw new PastVersionException(value, MAGNESIUM);
             case 8 -> MAGNESIUM;
             case 9 -> CHLORINE_SR2;
             default -> throw new FutureVersionException(value, CHLORINE_SR2);