import org.slf4j.LoggerFactory\r
import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder\rimport com.google.common.collect.Multimaps\r
import org.opendaylight.yangtools.concepts.util.ListenerRegistry\r
-import org.opendaylight.controller.sal.binding.api.NotificationProviderService.NotificationInterestListener\r
+import org.opendaylight.controller.sal.binding.api.NotificationProviderService.NotificationInterestListener\rimport java.util.Set\r
+import java.util.Set\r
+import com.google.common.collect.ImmutableSet\r
+import java.util.concurrent.Future\r
\r
class NotificationBrokerImpl implements NotificationProviderService, AutoCloseable {\r
\r
listenerToNotify = listenerToNotify + listeners.get(type as Class<? extends Notification>)\r
}\r
val tasks = listenerToNotify.map[new NotifyTask(it, notification)].toSet;\r
- executor.invokeAll(tasks);\r
+ submitAll(executor,tasks);\r
}\r
-\r
+ \r
+ def submitAll(ExecutorService service, Set<NotifyTask> tasks) {\r
+ val ret = ImmutableSet.<Future<Object>>builder();\r
+ for(task : tasks) {\r
+ ret.add(service.submit(task));\r
+ }\r
+ return ret.build();\r
+ }\r
+ \r
override <T extends Notification> registerNotificationListener(Class<T> notificationType,\r
NotificationListener<T> listener) {\r
val reg = new GenericNotificationRegistration<T>(notificationType, listener, this);\r