summaryrefslogtreecommitdiffstats
path: root/v3po/data-impl/src/main/java/org
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-04-11 08:56:06 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-04-12 11:04:11 +0200
commitf93415dd8b3719b380b4295ab364420b9bf3d927 (patch)
tree057de7e397985b74cef738936983c7db6e741cd7 /v3po/data-impl/src/main/java/org
parentd99066504f76a181c90832b939956f43b409c075 (diff)
HONEYCOMB-34: Config tree initialization using ModifiableDataTree dependency
Change-Id: I9fa6119a92cc1979ed6f3364bb74e856a7a712c5 Signed-off-by: Marek Gradzki <mgradzki@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/ConfigDataTreeModule.java15
-rw-r--r--v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java8
2 files changed, 23 insertions, 0 deletions
diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java
index 115eb065f..19267b1bd 100644
--- a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java
+++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java
@@ -9,9 +9,14 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification
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.impl.schema.tree.InMemoryDataTreeFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ConfigDataTreeModule extends
org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModule {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConfigDataTreeModule.class);
+
public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
@@ -31,6 +36,7 @@ public class ConfigDataTreeModule extends
@Override
public java.lang.AutoCloseable createInstance() {
+ LOG.info("ConfigDataTreeModule.createInstance()");
final DataTree dataTree = InMemoryDataTreeFactory.getInstance().create(TreeType.CONFIGURATION);
dataTree.setSchemaContext(getSchemaServiceDependency().getGlobalContext());
return new CloseableConfigDataTree(
@@ -47,17 +53,26 @@ public class ConfigDataTreeModule extends
@Override
public void close() throws Exception {
+ LOG.info("CloseableConfigDataTree.close()");
// NOP
}
@Override
public void modify(final DataTreeModification modification)
throws DataValidationFailedException, TranslationException {
+ LOG.trace("CloseableConfigDataTree.modify modification={}", modification);
delegate.modify(modification);
}
@Override
+ public void initialize(final DataTreeModification modification) throws DataValidationFailedException {
+ LOG.trace("CloseableConfigDataTree.initialize modification={}", modification);
+ delegate.initialize(modification);
+ }
+
+ @Override
public DataTreeSnapshot takeSnapshot() {
+ LOG.trace("CloseableConfigDataTree.takeSnapshot");
return delegate.takeSnapshot();
}
}
diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java
index 48053c366..0034b12c5 100644
--- a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java
+++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java
@@ -8,9 +8,14 @@ import javax.annotation.Nonnull;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class OperationalDataTreeModule extends
org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractOperationalDataTreeModule {
+
+ private static final Logger LOG = LoggerFactory.getLogger(OperationalDataTreeModule.class);
+
public OperationalDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
@@ -30,6 +35,7 @@ public class OperationalDataTreeModule extends
@Override
public java.lang.AutoCloseable createInstance() {
+ LOG.info("OperationalDataTreeModule.createInstance()");
return new CloseableOperationalDataTree(
new OperationalDataTree(getSerializerDependency(), getSchemaServiceDependency().getGlobalContext(),
getReaderRegistryDependency()));
@@ -45,12 +51,14 @@ public class OperationalDataTreeModule extends
@Override
public void close() throws Exception {
+ LOG.info("CloseableOperationalDataTree.close()");
// NOP
}
@Override
public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(
@Nonnull final YangInstanceIdentifier path) {
+ LOG.trace("CloseableOperationalDataTree.read path={}", path);
return delegate.read(path);
}
}