X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcds-access-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2FABIVersion.java;h=b4278f7d7909a6c0f7f3ed9dfe59893b4672e38f;hb=8d4821705d12546cb554c5c2e67f446be81a28eb;hp=84eb8f6c97f3222c91f9fab6037156c9cd42618e;hpb=ad14ee131e9b77bddb2b0c1211c6b0865140302f;p=controller.git diff --git a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java index 84eb8f6c97..b4278f7d79 100644 --- a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java +++ b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java @@ -76,6 +76,16 @@ public enum ABIVersion implements WritableObject { return NormalizedNodeStreamVersion.MAGNESIUM; } }, + /** + * Revised ABI version. The messages remain the same as {@link #MAGNESIUM}, the serialization proxies in use are + * flat objects without any superclasses. + */ + CHLORINE_SR2(9) { + @Override + public NormalizedNodeStreamVersion getStreamVersion() { + return NormalizedNodeStreamVersion.MAGNESIUM; + } + }, /** * Version which is newer than any other version. This version exists purely for testing purposes. @@ -132,10 +142,22 @@ public enum ABIVersion implements WritableObject { case 6 -> NEON_SR2; case 7 -> SODIUM_SR1; case 8 -> MAGNESIUM; - default -> throw new FutureVersionException(value, MAGNESIUM); + case 9 -> CHLORINE_SR2; + default -> throw new FutureVersionException(value, CHLORINE_SR2); }; } + /** + * Return {@code true} if this version is earier than some {@code other} version. + * + * @param other Other {@link ABIVersion} + * @return {@code true} if {@code other is later} + * @throws NullPointerException if {@code other} is null + */ + public boolean lt(final @NonNull ABIVersion other) { + return compareTo(other) < 0; + } + @Override public void writeTo(final DataOutput out) throws IOException { out.writeShort(value);