1 package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
3 import com.google.common.base.Optional;
4 import com.google.common.util.concurrent.CheckedFuture;
5 import io.fd.honeycomb.v3po.data.DataModification;
6 import io.fd.honeycomb.v3po.data.ModifiableDataManager;
7 import io.fd.honeycomb.v3po.data.impl.ModifiableDataTreeDelegator;
8 import javax.annotation.Nonnull;
9 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
10 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
11 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
15 public class ConfigDataTreeModule extends
16 org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModule {
18 private static final Logger LOG = LoggerFactory.getLogger(ConfigDataTreeModule.class);
20 public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
21 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
22 super(identifier, dependencyResolver);
25 public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
26 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
27 org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.ConfigDataTreeModule oldModule,
28 java.lang.AutoCloseable oldInstance) {
29 super(identifier, dependencyResolver, oldModule, oldInstance);
33 public void customValidation() {
34 // add custom validation form module attributes here.
38 public java.lang.AutoCloseable createInstance() {
39 LOG.debug("ConfigDataTreeModule.createInstance()");
40 return new CloseableConfigDataTree(
41 new ModifiableDataTreeDelegator(getSerializerDependency(), getDataTreeDependency(),
42 getWriterRegistryBuilderDependency().build(), getContextBindingBrokerDependency()));
45 private static final class CloseableConfigDataTree implements ModifiableDataManager, AutoCloseable {
47 private final ModifiableDataTreeDelegator delegate;
49 CloseableConfigDataTree(final ModifiableDataTreeDelegator delegate) {
50 this.delegate = delegate;
54 public void close() throws Exception {
55 LOG.debug("CloseableConfigDataTree.close()");
60 public DataModification newModification() {
61 LOG.trace("CloseableConfigDataTree.newModification");
62 return delegate.newModification();
66 public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(
67 @Nonnull final YangInstanceIdentifier path) {
68 return delegate.read(path);