summaryrefslogtreecommitdiffstats
path: root/v3po/data-impl/src/main/java/org
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-05-13 11:24:15 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-05-23 09:23:53 +0000
commit5f10c13fc3bff497f6556f0538b08060e4f28105 (patch)
tree6032a7549f90f75d72ef1ea3f1ddaaa469cb82cb /v3po/data-impl/src/main/java/org
parent0fbc1362777869101c375006d6db423ec868924b (diff)
HONEYCOMB-61: Make InmemoryDataTree module type configurable
Change-Id: Ie73eac8960a76ebcc578d3b44c50492f29908e24 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/data-impl/src/main/java/org')
-rw-r--r--v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java (renamed from v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModule.java)28
-rw-r--r--v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java (renamed from v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModuleFactory.java)6
2 files changed, 16 insertions, 18 deletions
diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModule.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java
index 9ae8a01f5..54c830ec0 100644
--- a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModule.java
+++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java
@@ -1,26 +1,21 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.*;
import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class InMemoryConfigDataTreeModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryConfigDataTreeModule {
+public class InMemoryDataTreeModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryDataTreeModule {
- private static final Logger LOG = LoggerFactory.getLogger(InMemoryConfigDataTreeModule.class);
+ private static final Logger LOG = LoggerFactory.getLogger(InMemoryDataTreeModule.class);
- public InMemoryConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+ public InMemoryDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
}
- public InMemoryConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.InMemoryConfigDataTreeModule oldModule, java.lang.AutoCloseable oldInstance) {
+ public InMemoryDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.InMemoryDataTreeModule oldModule, java.lang.AutoCloseable oldInstance) {
super(identifier, dependencyResolver, oldModule, oldInstance);
}
@@ -32,14 +27,17 @@ public class InMemoryConfigDataTreeModule extends org.opendaylight.yang.gen.v1.u
@Override
public java.lang.AutoCloseable createInstance() {
LOG.debug("InMemoryConfigDataTreeModule.createInstance()");
- return new CloseableConfigDataTree(getSchemaServiceDependency().getGlobalContext());
+ return new CloseableConfigDataTree(getSchemaServiceDependency().getGlobalContext(), getType());
}
- private static class CloseableConfigDataTree implements AutoCloseable, DataTree {
- private final DataTree dataTree;
+ private static class CloseableConfigDataTree implements AutoCloseable,
+ org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree {
+ private final org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree dataTree;
- public CloseableConfigDataTree(final SchemaContext schemaContext) {
- this.dataTree = InMemoryDataTreeFactory.getInstance().create(TreeType.CONFIGURATION);
+ public CloseableConfigDataTree(final SchemaContext schemaContext, final DatatreeType type) {
+ this.dataTree = InMemoryDataTreeFactory.getInstance().create(
+ type == DatatreeType.Config ? TreeType.CONFIGURATION : TreeType.OPERATIONAL
+ );
dataTree.setSchemaContext(schemaContext);
}
diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModuleFactory.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java
index 504e007c0..34a543949 100644
--- a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModuleFactory.java
+++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java
@@ -1,13 +1,13 @@
/*
* Generated file
*
-* Generated from: yang module name: data-impl yang module local name: inmemory-config-data-tree
+* Generated from: yang module name: data-impl yang module local name: inmemory-data-tree
* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Tue Apr 12 07:26:54 CEST 2016
+* Generated at: Fri May 13 11:10:56 CEST 2016
*
* Do not modify this file unless it is present under src/main directory
*/
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-public class InMemoryConfigDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryConfigDataTreeModuleFactory {
+public class InMemoryDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryDataTreeModuleFactory {
}