Bug 7521: Convert byte[] to ShardManagerSnapshot in DatastoreSnapshot
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / RemotePrimaryShardFound.java
index 662eefd9d1ec00d813a5727bda0c64e38d5ab061..d3e27dba95b847c4b6ad65487acb9e0bd1f28245 100644 (file)
@@ -17,19 +17,26 @@ public class RemotePrimaryShardFound implements Serializable {
     private static final long serialVersionUID = 1L;
 
     private final String primaryPath;
+    private final short primaryVersion;
 
-    public RemotePrimaryShardFound(final String primaryPath) {
+    public RemotePrimaryShardFound(final String primaryPath, short primaryVersion) {
         this.primaryPath = primaryPath;
+        this.primaryVersion = primaryVersion;
     }
 
     public String getPrimaryPath() {
         return primaryPath;
     }
 
+    public short getPrimaryVersion() {
+        return primaryVersion;
+    }
+
     @Override
     public String toString() {
         StringBuilder builder = new StringBuilder();
-        builder.append("RemotePrimaryShardFound [primaryPath=").append(primaryPath).append("]");
+        builder.append("RemotePrimaryShardFound [primaryPath=").append(primaryPath).append(", primaryVersion=")
+                .append(primaryVersion).append("]");
         return builder.toString();
     }
 }