import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueue;
import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueueHandlerRegistration;
final private KeyedInstanceIdentifier<Node, NodeKey> nodeII;
final private Short version;
final private BigInteger datapathId;
+ final private ServiceGroupIdentifier serviceGroupIdentifier;
DeviceInfoImpl(
final NodeId nodeId,
this.nodeII = nodeII;
this.version = version;
this.datapathId = datapathId;
+ this.serviceGroupIdentifier = ServiceGroupIdentifier.create(this.nodeId.getValue());
}
@Override
return datapathId;
}
+ @Override
+ public ServiceGroupIdentifier getServiceIdentifier() {
+ return this.serviceGroupIdentifier;
+ }
+
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
DeviceInfoImpl that = (DeviceInfoImpl) o;
- return nodeId.equals(that.nodeId) &&
+ return (nodeId.equals(that.nodeId) &&
nodeII.equals(that.nodeII) &&
version.equals(that.version) &&
- datapathId.equals(that.datapathId);
+ datapathId.equals(that.datapathId));
}