BUG-509: use dedicated executor for notifications 62/6262/2
authorRobert Varga <rovarga@cisco.com>
Thu, 17 Apr 2014 16:48:22 +0000 (18:48 +0200)
committerRobert Varga <rovarga@cisco.com>
Thu, 17 Apr 2014 16:50:15 +0000 (18:50 +0200)
This dedicates a thread to datastore notifications, such that they are
delivered outside of the invoking threads. Also adds proper headers.

Change-Id: I44aeb9c4fefb8784d22ded9ae591d38993905ffa
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java

index 696c10eb19faafc8c78ae606188211debf3e4475..ad0de54bc035bf49863ef350cdc045af2fd35f48 100644 (file)
@@ -1,11 +1,9 @@
-/**
- * Generated file
-
- * Generated from: yang module name: opendaylight-sal-dom-broker-impl  yang module local name: dom-inmemory-data-broker
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Fri Mar 28 17:32:48 CET 2014
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
  *
  *
- * Do not modify this file unless it is present under src/main directory
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 package org.opendaylight.controller.config.yang.md.sal.dom.impl;
 
  */
 package org.opendaylight.controller.config.yang.md.sal.dom.impl;
 
@@ -57,7 +55,7 @@ public final class DomInmemoryDataBrokerModule extends
                 .<LogicalDatastoreType, DOMStore> builder().put(LogicalDatastoreType.OPERATIONAL, operStore)
                 .put(LogicalDatastoreType.CONFIGURATION, configStore).build();
 
                 .<LogicalDatastoreType, DOMStore> builder().put(LogicalDatastoreType.OPERATIONAL, operStore)
                 .put(LogicalDatastoreType.CONFIGURATION, configStore).build();
 
-        DOMDataBrokerImpl newDataBroker = new DOMDataBrokerImpl(datastores, MoreExecutors.sameThreadExecutor());
+        DOMDataBrokerImpl newDataBroker = new DOMDataBrokerImpl(datastores, MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor()));
 
         getBundleContext().registerService(DOMDataBroker.class, newDataBroker, new Hashtable<String, String>());
 
 
         getBundleContext().registerService(DOMDataBroker.class, newDataBroker, new Hashtable<String, String>());
 
index 92d159cec6956d50e3312d3a3e9ea03f98ef7347..91d42c48c13577853ecbc7d3a618bf0b2de93f4e 100644 (file)
@@ -1,12 +1,10 @@
-/**
-* Generated file
-
-* Generated from: yang module name: opendaylight-sal-dom-broker-impl  yang module local name: dom-inmemory-data-broker
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri Mar 28 17:32:48 CET 2014
-*
-* Do not modify this file unless it is present under src/main directory
-*/
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.config.yang.md.sal.dom.impl;
 
 import org.opendaylight.controller.config.api.DependencyResolver;
 package org.opendaylight.controller.config.yang.md.sal.dom.impl;
 
 import org.opendaylight.controller.config.api.DependencyResolver;