2 * Copyright (c) 2013 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.sal.topology;
13 import org.opendaylight.controller.sal.core.Edge;
14 import org.opendaylight.controller.sal.core.Property;
15 import org.opendaylight.controller.sal.core.UpdateType;
18 * The class represents an Edge, the Edge's Property Set and its UpdateType.
20 public class TopoEdgeUpdate {
22 private Set<Property> props;
23 private UpdateType type;
24 private boolean isLocal;
27 * Constructor for a topology element update. A TopologyElementUpdate is an
28 * object that summarize what has happened on an Edge and if the update is
29 * generated locally to this controller or no
34 * Set of Properties attached to the edge
38 public TopoEdgeUpdate(Edge e, Set<Property> p, UpdateType t) {
45 public Edge getEdge() {
49 public Set<Property> getProperty() {
53 public UpdateType getUpdateType() {
58 public int hashCode() {
61 result = (prime * result) + ((edge == null) ? 0 : edge.hashCode());
62 result = (prime * result) + ((type == null) ? 0 : type.hashCode());
67 public String toString() {
68 return "TopoEdgeUpdate [edge=" + edge + ", props=" + props + ", type=" + type + ", isLocal=" + isLocal + "]";
72 public boolean equals(Object obj) {
79 if (getClass() != obj.getClass()) {
82 TopoEdgeUpdate other = (TopoEdgeUpdate) obj;
84 if (other.edge != null) {
87 } else if (!edge.equals(other.edge)) {
90 if (type != other.type) {
96 public boolean isLocal() {
100 public void setLocal(boolean isLocal) {
101 this.isLocal = isLocal;