2 * Copyright (C) 2015 Red Hat, Inc.
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
8 * Authors : Flavio Fernandes
10 package org.opendaylight.ovsdb.openstack.netvirt;
12 import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
14 public class NodeCacheManagerEvent extends AbstractEvent {
16 private String nodeIdentifier;
18 public NodeCacheManagerEvent(String nodeIdentifier, Action action) {
19 super(HandlerType.NODE, action);
20 this.nodeIdentifier = nodeIdentifier;
23 public String getNodeIdentifier() {
24 return nodeIdentifier;
28 public String toString() {
29 return "NodeCacheManagerEvent [action=" + super.getAction()
30 + ", nodeIdentifier=" + nodeIdentifier
35 public int hashCode() {
37 int result = super.hashCode();
38 result = prime * result + ((nodeIdentifier == null) ? 0 : nodeIdentifier.hashCode());
43 public boolean equals(Object obj) {
50 if (getClass() != obj.getClass()) {
53 if (!super.equals(obj)) {
56 NodeCacheManagerEvent other = (NodeCacheManagerEvent) obj;
57 if (nodeIdentifier == null) {
58 if (other.nodeIdentifier != null) {
61 } else if (!nodeIdentifier.equals(other.nodeIdentifier)) {