summaryrefslogtreecommitdiffstats
path: root/infra/minimal-distribution-core
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-01-04 07:08:34 +0100
committerMarek Gradzki <mgradzki@cisco.com>2018-03-23 06:54:25 +0100
commit8acc5613345d9c50d0f33c3d74ae64e474b80724 (patch)
tree130723e4f6e4daa2fcc57538d971dfd34886c8a8 /infra/minimal-distribution-core
parentbc559d4e6ccbdbaf65e612e56b2fe5d0614ff623 (diff)
HONEYCOMB-424: bump ODL dependencies to Oxygen
Change-Id: I3160e5df4e66b3b3c732619fc1fc7599459fda76 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/minimal-distribution-core')
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java17
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java7
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java1
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java6
4 files changed, 16 insertions, 15 deletions
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java
index 039a0ad82..34d3916fc 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java
@@ -21,8 +21,7 @@ import io.fd.honeycomb.binding.init.ProviderTrait;
import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration;
import org.opendaylight.controller.sal.core.api.model.SchemaService;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeConfiguration;
import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
public abstract class DataTreeProvider extends ProviderTrait<DataTree> {
@@ -33,26 +32,26 @@ public abstract class DataTreeProvider extends ProviderTrait<DataTree> {
private HoneycombConfiguration config;
@Override
- public TipProducingDataTree create() {
- TipProducingDataTree delegate = InMemoryDataTreeFactory.getInstance().create(getType());
+ public DataTree create() {
+ DataTree delegate = new InMemoryDataTreeFactory().create(getType());
delegate.setSchemaContext(schemaService.getGlobalContext());
return delegate;
}
- public abstract TreeType getType();
+ public abstract DataTreeConfiguration getType();
public static class ConfigDataTreeProvider extends DataTreeProvider {
@Override
- public TreeType getType() {
- return TreeType.CONFIGURATION;
+ public DataTreeConfiguration getType() {
+ return DataTreeConfiguration.DEFAULT_CONFIGURATION;
}
}
public static class ContextDataTreeProvider extends DataTreeProvider {
@Override
- public TreeType getType() {
- return TreeType.OPERATIONAL;
+ public DataTreeConfiguration getType() {
+ return DataTreeConfiguration.DEFAULT_OPERATIONAL;
}
}
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
index 550b9bec5..5f12358a6 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/InmemoryDOMDataBrokerProvider.java
@@ -47,8 +47,9 @@ public final class InmemoryDOMDataBrokerProvider extends ProviderTrait<DOMDataBr
protected SerializedDOMDataBroker create() {
// This Databroker is dedicated for netconf metadata, not expected to be under heavy load
ExecutorService listenableFutureExecutor =
- SpecialExecutors.newBlockingBoundedCachedThreadPool(1, 100, "commits");
- ExecutorService commitExecutor = SpecialExecutors.newBoundedSingleThreadExecutor(100, "WriteTxCommit");
+ SpecialExecutors.newBlockingBoundedCachedThreadPool(1, 100, "commits", getClass());
+ ExecutorService commitExecutor =
+ SpecialExecutors.newBoundedSingleThreadExecutor(100, "WriteTxCommit", getClass());
// TODO HONEYCOMB-164 try to provide more lightweight implementation of DataBroker
Map<LogicalDatastoreType, DOMStore> map = new LinkedHashMap<>();
@@ -56,6 +57,6 @@ public final class InmemoryDOMDataBrokerProvider extends ProviderTrait<DOMDataBr
map.put(LogicalDatastoreType.OPERATIONAL, operDataStore);
return new SerializedDOMDataBroker(map, new DeadlockDetectingListeningExecutorService(commitExecutor,
- TransactionCommitDeadlockException.DEADLOCK_EXCEPTION_SUPPLIER, listenableFutureExecutor));
+ TransactionCommitDeadlockException.DEADLOCK_EXCEPTION_SUPPLIER, listenableFutureExecutor));
}
}
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
index 4ed3698ec..fe1006df1 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
@@ -25,6 +25,7 @@ import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
+// TODO: provide DOMSchemaService instead, but first Netconf's RestconfProviderImpl should not use it
public final class SchemaServiceProvider extends ProviderTrait<SchemaService> {
@Inject
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java
index dbd08a422..f38e2446d 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java
@@ -20,12 +20,12 @@ import com.google.inject.Inject;
import io.fd.honeycomb.binding.init.ProviderTrait;
import javassist.ClassPool;
import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
+import org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator;
+import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
+import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry;
import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
-import org.opendaylight.yangtools.binding.data.codec.gen.impl.DataObjectSerializerGenerator;
-import org.opendaylight.yangtools.binding.data.codec.gen.impl.StreamWriterGenerator;
-import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
public class SerializerProvider extends ProviderTrait<BindingToNormalizedNodeCodec> {