[ONOS-7547] Implement support for backwards/forward compatibility of ConsistentMap values on read
Change-Id: Ifffb6a883ec4ee6aa5587da58a51c1e90694e5ea
diff --git a/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveOptions.java b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveOptions.java
index c576375..1691086 100644
--- a/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveOptions.java
+++ b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveOptions.java
@@ -38,8 +38,8 @@
private boolean meteringDisabled = false;
private boolean readOnly = false;
private boolean relaxedReadConsistency = false;
- private int revisionNumber = 1;
- private RevisionType revisionType = RevisionType.NONE;
+ private Version version;
+ private RevisionType revisionType;
public DistributedPrimitiveOptions(DistributedPrimitive.Type type) {
this.type = type;
@@ -85,17 +85,7 @@
* @return this builder
*/
public O withVersion(Version version) {
- return withRevisionNumber(version.toInt());
- }
-
- /**
- * Sets the primitive revision.
- *
- * @param revision the primitive revision
- * @return this builder
- */
- public O withRevisionNumber(int revision) {
- this.revisionNumber = revision;
+ this.version = version;
return (O) this;
}
@@ -212,12 +202,12 @@
}
/**
- * Returns the primitive revision number.
+ * Returns the primitive version.
*
- * @return the primitive revision number
+ * @return the primitive version
*/
- public final int revision() {
- return revisionNumber;
+ public final Version version() {
+ return version;
}
/**