1 package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
3 import io.fd.honeycomb.v3po.data.DataTreeSnapshot;
4 import io.fd.honeycomb.v3po.data.ModifiableDataTree;
5 import io.fd.honeycomb.v3po.data.impl.ConfigDataTree;
6 import io.fd.honeycomb.v3po.translate.TranslationException;
7 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
8 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
9 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory;
12 public class ConfigDataTreeModule extends
13 org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModule {
15 private static final Logger LOG = LoggerFactory.getLogger(ConfigDataTreeModule.class);
17 public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
18 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
19 super(identifier, dependencyResolver);
22 public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
23 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
24 org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.ConfigDataTreeModule oldModule,
25 java.lang.AutoCloseable oldInstance) {
26 super(identifier, dependencyResolver, oldModule, oldInstance);
30 public void customValidation() {
31 // add custom validation form module attributes here.
35 public java.lang.AutoCloseable createInstance() {
36 LOG.debug("ConfigDataTreeModule.createInstance()");
37 return new CloseableConfigDataTree(
38 new ConfigDataTree(getSerializerDependency(), getDataTreeDependency(), getWriterRegistryDependency()));
41 private static final class CloseableConfigDataTree implements ModifiableDataTree, AutoCloseable {
43 private final ConfigDataTree delegate;
45 CloseableConfigDataTree(final ConfigDataTree delegate) {
46 this.delegate = delegate;
50 public void close() throws Exception {
51 LOG.debug("CloseableConfigDataTree.close()");
56 public void modify(final DataTreeModification modification)
57 throws DataValidationFailedException, TranslationException {
58 LOG.trace("CloseableConfigDataTree.modify modification={}", modification);
59 delegate.modify(modification);
63 public DataTreeSnapshot takeSnapshot() {
64 LOG.trace("CloseableConfigDataTree.takeSnapshot");
65 return delegate.takeSnapshot();