From 236fb4c2e98582dc8e9a887fd0691f79df4503b9 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 17 Apr 2014 18:48:22 +0200 Subject: [PATCH] BUG-509: use dedicated executor for notifications 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 --- .../dom/impl/DomInmemoryDataBrokerModule.java | 14 ++++++-------- .../impl/DomInmemoryDataBrokerModuleFactory.java | 16 +++++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java index 696c10eb19..ad0de54bc0 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java @@ -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; @@ -57,7 +55,7 @@ public final class DomInmemoryDataBrokerModule extends . 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()); diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java index 92d159cec6..91d42c48c1 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java @@ -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; -- 2.36.6