X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fcompat%2FAggregatedNotificationListenerRegistration.java;h=339ad68ff762cdbf996d81f3bb228673cbbb5dd7;hb=e8891e7fcf3cbf9de7217d6e7dee59be6e2bb2a6;hp=151439945ef98ad35b2a56da9a630469684d9b8f;hpb=cac7138ddd81d1cc801d4b6cd9bc4372e0a8ddd3;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/AggregatedNotificationListenerRegistration.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/AggregatedNotificationListenerRegistration.java index 151439945e..339ad68ff7 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/AggregatedNotificationListenerRegistration.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/AggregatedNotificationListenerRegistration.java @@ -7,26 +7,28 @@ */ package org.opendaylight.controller.md.sal.binding.compat; +import com.google.common.base.Preconditions; import org.opendaylight.controller.sal.binding.api.NotificationListener; import org.opendaylight.yangtools.yang.binding.Notification; -import com.google.common.base.Preconditions; - /** * An aggregated listener registration. This is a result of registering an invoker which can handle multiple * interfaces at the same time. In order to support correct delivery, we need to maintain per-type registrations * which get squashed if a notification which implements multiple interfaces is encountered. * + *

* We take care of that by implementing alternate {@link #hashCode()}/{@link #equals(Object)}, which resolve * to the backing aggregator. * * @param Notification type * @param Aggregator type */ -abstract class AggregatedNotificationListenerRegistration extends AbstractNotificationListenerRegistration { +abstract class AggregatedNotificationListenerRegistration + extends AbstractNotificationListenerRegistration { private final A aggregator; - protected AggregatedNotificationListenerRegistration(final Class type, final NotificationListener listener, final A aggregator) { + protected AggregatedNotificationListenerRegistration(final Class type, + final NotificationListener listener, final A aggregator) { super(type, listener); this.aggregator = Preconditions.checkNotNull(aggregator); }