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..a5565020edc171e43d550f7ace0a8dc6a80739e3 100644 (file)
@@ -8,5 +8,56 @@
 
 package org.opendaylight.controller.cluster.datastore.messages;
 
-public class PrimaryFound {
+
+public class PrimaryFound implements SerializableMessage {
+  public static final Class<PrimaryFound> SERIALIZABLE_CLASS = PrimaryFound.class;
+  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() {
+    return "PrimaryFound{" +
+            "primaryPath='" + primaryPath + '\'' +
+            '}';
+  }
+
+
+  @Override
+  public Object toSerializable() {
+    return  this;
+  }
+
+  public static PrimaryFound fromSerializable(final Object message){
+    return (PrimaryFound) message;
+  }
 }