Merge "Prevent ConfigPusher from killing its thread"
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / DataBrokerImpl.java
index 56eae97848b71c9556c0eb3108c6d7f92e38b200..ba3dcc8c866f833fe18cb1ebe9e32061a947f521 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * 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.sal.dom.broker;
 
 import java.util.concurrent.atomic.AtomicLong;
@@ -13,6 +20,8 @@ import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
 
+import com.google.common.util.concurrent.MoreExecutors;
+
 public class DataBrokerImpl extends AbstractDataBroker<InstanceIdentifier, CompositeNode, DataChangeListener> implements
         DataProviderService, AutoCloseable {
 
@@ -21,6 +30,7 @@ public class DataBrokerImpl extends AbstractDataBroker<InstanceIdentifier, Compo
     
     public DataBrokerImpl() {
         setDataReadRouter(new DataReaderRouter());
+        setExecutor(MoreExecutors.sameThreadExecutor());
     }
     
     public AtomicLong getCreatedTransactionsCount() {
@@ -76,4 +86,4 @@ public class DataBrokerImpl extends AbstractDataBroker<InstanceIdentifier, Compo
         
     }
 
-}
\ No newline at end of file
+}