Merge "Increase default negotiation timeout for netconf server to 30s"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / PrimaryFound.java
index 1326898b0f4059ef215c34d8b175306a1b2a8c9a..4c154d43ae007268b153f2503ad949250031cb21 100644 (file)
@@ -8,5 +8,48 @@
 
 package org.opendaylight.controller.cluster.datastore.messages;
 
-public class PrimaryFound {
+import java.io.Serializable;
+
+public class PrimaryFound implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private final String primaryPath;
+
+    public PrimaryFound(final String primaryPath) {
+        this.primaryPath = primaryPath;
+    }
+
+    public String getPrimaryPath() {
+        return primaryPath;
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        PrimaryFound that = (PrimaryFound) o;
+
+        if (!primaryPath.equals(that.primaryPath)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        return primaryPath.hashCode();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("PrimaryFound [primaryPath=").append(primaryPath).append("]");
+        return builder.toString();
+    }
 }