Changed multimaps to synchronized multimaps
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / impl / NotificationRouterImpl.java
index 6d7b600dbcb3a4b68377cdec27a3314e24df6812..763407f23a671476c7f47a9c8f7e3d63e0b2b128 100644 (file)
@@ -34,16 +34,17 @@ import org.slf4j.LoggerFactory;
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
 
 public class NotificationRouterImpl implements NotificationRouter {
     private static Logger log = LoggerFactory.getLogger(NotificationRouterImpl.class);
 
-    private Multimap<QName, Registration<NotificationListener>> listeners = HashMultimap.create();
+    private Multimap<QName, Registration<NotificationListener>> listeners = Multimaps.synchronizedSetMultimap(HashMultimap.<QName, Registration<NotificationListener>>create());
 
     private void sendNotification(CompositeNode notification) {
         QName type = notification.getNodeType();
         Collection<Registration<NotificationListener>> toNotify = listeners.get(type);
-        log.info("Publishing notification " + type);
+        log.trace("Publishing notification " + type);
 
         if (toNotify == null) {
             // No listeners were registered - returns.