Switch from using a Long as FlowId to a Uri
authorMoiz Raja <moraja@cisco.com>
Tue, 7 Jan 2014 21:48:00 +0000 (13:48 -0800)
committerMoiz Raja <moraja@cisco.com>
Sat, 11 Jan 2014 01:16:18 +0000 (17:16 -0800)
Couple of things you may want to pay attention to,

a. FlowProgrammerAdapter maintains a mapping between a Flow and it's id in a map in infinispan
b. Look at internalAddFlowAsync. If it finds that a flow is in the flow to id mapping cache. It will remove the flow and add it back in. This is what makes the switch add back a flow when it a switch comes back alive.
c. The sync vs async behavior should now be properly done

Change-Id: Id156ebbc7b6e643e4a5960aa735d0812bf5cbe48
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationBrokerImpl.xtend

index b10c06f0c53e359ec2cabe3028b7243339c6f53b..b0939a043f68c72f7f994fa538a005d4942f08ea 100644 (file)
@@ -20,8 +20,9 @@ import org.opendaylight.yangtools.concepts.AbstractObjectRegistration
 import org.opendaylight.yangtools.concepts.ListenerRegistration\r
 import org.opendaylight.yangtools.concepts.Registration\r
 import org.opendaylight.yangtools.yang.binding.Notification\r
-import org.slf4j.LoggerFactory\rimport org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder
-
+import org.slf4j.LoggerFactory\r
+import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder\r
+\r
 class NotificationBrokerImpl implements NotificationProviderService, AutoCloseable {\r
 \r
     val Multimap<Class<? extends Notification>, NotificationListener<?>> listeners;\r
@@ -178,10 +179,19 @@ class NotifyTask implements Callable<Object> {
     val Notification notification;\r
 \r
     override call() {\r
+        //Only logging the complete notification in debug mode\r
         try {\r
-            log.info("Delivering notification {} to {}",notification,listener);\r
+            if(log.isDebugEnabled){\r
+                log.debug("Delivering notification {} to {}",notification,listener);\r
+            } else {\r
+                log.info("Delivering notification {} to {}",notification.class.name,listener);\r
+            }\r
             listener.onNotification(notification);\r
-            log.info("Notification delivered {} to {}",notification,listener);\r
+            if(log.isDebugEnabled){\r
+                log.debug("Notification delivered {} to {}",notification,listener);\r
+            } else {\r
+                log.info("Notification delivered {} to {}",notification.class.name,listener);\r
+            }\r
         } catch (Exception e) {\r
             log.error("Unhandled exception thrown by listener: {}", listener, e);\r
         }\r