String performance and maintenability
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / RemotePrimaryShardFound.java
index 662eefd9d1ec00d813a5727bda0c64e38d5ab061..fbe34b2ed7c4e1a9149345713efc36e9318f2dd6 100644 (file)
@@ -17,19 +17,24 @@ 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("]");
-        return builder.toString();
+        return "RemotePrimaryShardFound [primaryPath=" + primaryPath
+                + ", primaryVersion=" + primaryVersion + "]";
     }
 }