Exception when creating new DOMNotificationRouter 77/15777/2
authorJan Hajnar <jhajnar@cisco.com>
Thu, 26 Feb 2015 13:49:41 +0000 (14:49 +0100)
committerJan Hajnar <jhajnar@cisco.com>
Fri, 27 Feb 2015 08:46:19 +0000 (08:46 +0000)
* method after(eventHandler) was called on EventHandler that was not started.
* added missing disruptor.handleEventsWith() call before handler chaining
setup

documentation for 'after()' method:
https://lmax-exchange.github.io/disruptor/docs/index.html
class Disruptor, method after()

Change-Id: Icb5390114000d3f1bf1ea4096263ded633d9f123
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouter.java

index aac425b3d400ca9ed530230a0359740f4f3db74c..b9972fc0a09f9773db0270e51198209438df010e 100644 (file)
@@ -79,6 +79,7 @@ public final class DOMNotificationRouter implements AutoCloseable, DOMNotificati
         final ExecutorService executor = Executors.newCachedThreadPool();
         final Disruptor<DOMNotificationRouterEvent> disruptor = new Disruptor<>(DOMNotificationRouterEvent.FACTORY, queueDepth, executor, ProducerType.MULTI, DEFAULT_STRATEGY);
 
+        disruptor.handleEventsWith(DISPATCH_NOTIFICATIONS);
         disruptor.after(DISPATCH_NOTIFICATIONS).handleEventsWith(NOTIFY_FUTURE);
         disruptor.start();