2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.datastore.messages;
12 public class PrimaryFound implements SerializableMessage {
13 public static final Class SERIALIZABLE_CLASS = PrimaryFound.class;
14 private final String primaryPath;
16 public PrimaryFound(String primaryPath) {
17 this.primaryPath = primaryPath;
20 public String getPrimaryPath() {
25 public boolean equals(Object o) {
26 if (this == o) return true;
27 if (o == null || getClass() != o.getClass()) return false;
29 PrimaryFound that = (PrimaryFound) o;
31 if (!primaryPath.equals(that.primaryPath)) return false;
37 public int hashCode() {
38 return primaryPath.hashCode();
42 public String toString() {
43 return "PrimaryFound{" +
44 "primaryPath='" + primaryPath + '\'' +
50 public Object toSerializable() {
54 public static PrimaryFound fromSerializable(Object message){
55 return (PrimaryFound) message;