X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fimpl%2FNotificationBrokerImpl.xtend;h=a7dcf80e8dbd5366ca366b0d2c50fce573a598bf;hp=d997af59126833190b26696e752dfcc7061fe352;hb=cdad86dae2cdb6e686e821091cb33a772eb3b50c;hpb=24fa75eae25771889b94c316f55282c39795d166 diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationBrokerImpl.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationBrokerImpl.xtend index d997af5912..a7dcf80e8d 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationBrokerImpl.xtend +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationBrokerImpl.xtend @@ -23,8 +23,10 @@ import org.opendaylight.yangtools.yang.binding.Notification import org.slf4j.LoggerFactory import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder import com.google.common.collect.Multimaps import org.opendaylight.yangtools.concepts.util.ListenerRegistry -import org.opendaylight.controller.sal.binding.api.NotificationProviderService.NotificationInterestListener - +import org.opendaylight.controller.sal.binding.api.NotificationProviderService.NotificationInterestListener import java.util.Set +import com.google.common.collect.ImmutableSet +import java.util.concurrent.Future + class NotificationBrokerImpl implements NotificationProviderService, AutoCloseable { val ListenerRegistry interestListeners = ListenerRegistry.create; @@ -100,7 +102,15 @@ class NotificationBrokerImpl implements NotificationProviderService, AutoCloseab listenerToNotify = listenerToNotify + listeners.get(type as Class) } val tasks = listenerToNotify.map[new NotifyTask(it, notification)].toSet; - executor.invokeAll(tasks); + submitAll(executor,tasks); + } + + def submitAll(ExecutorService service, Set tasks) { + val ret = ImmutableSet.>builder(); + for(task : tasks) { + ret.add(service.submit(task)); + } + return ret.build(); } override registerNotificationListener(Class notificationType,