diff options
author | 2016-04-10 22:06:36 +0200 | |
---|---|---|
committer | 2016-04-12 10:59:14 +0200 | |
commit | 6dcea1de979536dbe0478e31f17191bcfae92f3c (patch) | |
tree | a5070e77f1de0c17476a33aeaaa68fc21ba4315a /v3po/data-impl/src/main/java/io | |
parent | 4ebc67b58e0172bd4f5704e52a10714ee64d7d07 (diff) |
HONEYCOMB-34: Configurable serializer dependency
Change-Id: I05cb7836ec4a379f7617710a6c6f64c3541ff0c9
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/data-impl/src/main/java/io')
4 files changed, 17 insertions, 16 deletions
diff --git a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ConfigDataTree.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ConfigDataTree.java index 84a1d27e3..f636e6708 100644 --- a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ConfigDataTree.java +++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/ConfigDataTree.java @@ -34,7 +34,7 @@ import java.util.Map; import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException; import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; diff --git a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataBroker.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataBroker.java index 7b4d93baa..47b27f707 100644 --- a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataBroker.java +++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataBroker.java @@ -17,9 +17,9 @@ package io.fd.honeycomb.v3po.data.impl; import com.google.common.base.Preconditions; -import io.fd.honeycomb.v3po.data.ReadableDataTree; -import io.fd.honeycomb.v3po.data.ModifiableDataTree; import io.fd.honeycomb.v3po.data.DataTreeSnapshot; +import io.fd.honeycomb.v3po.data.ModifiableDataTree; +import io.fd.honeycomb.v3po.data.ReadableDataTree; import java.util.Collections; import java.util.Map; import javax.annotation.Nonnull; @@ -37,36 +37,37 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; /** - * Data Broker which provides data transaction functionality for YANG capable data provider - * using {@link NormalizedNode} data format. + * Data Broker which provides data transaction functionality for YANG capable data provider using {@link NormalizedNode} + * data format. */ public class DataBroker implements DOMDataBroker { - private final ReadableDataTree operationalData; + private final ReadableDataTree operationalDataTree; private final ModifiableDataTree configDataTree; /** * Creates DataBroker instance. * - * @param operationalData operational data - * @param configDataTree configuration data + * @param operationalDataTree operational data + * @param configDataTree configuration data */ - public DataBroker(@Nonnull final ReadableDataTree operationalData, + public DataBroker(@Nonnull final ReadableDataTree operationalDataTree, @Nonnull final ModifiableDataTree configDataTree) { - this.operationalData = Preconditions.checkNotNull(operationalData, "operationalData should not be null"); - this.configDataTree = Preconditions.checkNotNull(configDataTree, "configDataProxy should not be null"); + this.operationalDataTree = + Preconditions.checkNotNull(operationalDataTree, "operationalDataTree should not be null"); + this.configDataTree = Preconditions.checkNotNull(configDataTree, "configDataTree should not be null"); } @Override public DOMDataReadOnlyTransaction newReadOnlyTransaction() { - return new ReadOnlyTransaction(operationalData, configDataTree.takeSnapshot()); + return new ReadOnlyTransaction(operationalDataTree, configDataTree.takeSnapshot()); } @Override public DOMDataReadWriteTransaction newReadWriteTransaction() { // todo use the same snapshot final DataTreeSnapshot configSnapshot = configDataTree.takeSnapshot(); - final DOMDataReadOnlyTransaction readOnlyTx = new ReadOnlyTransaction(operationalData, configSnapshot); + final DOMDataReadOnlyTransaction readOnlyTx = new ReadOnlyTransaction(operationalDataTree, configSnapshot); final DOMDataWriteTransaction writeOnlyTx = new WriteTransaction(configDataTree, configSnapshot); return new ReadWriteTransaction(readOnlyTx, writeOnlyTx); } diff --git a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtils.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtils.java index 39e841f9a..de83a198b 100644 --- a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtils.java +++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/DataTreeUtils.java @@ -21,7 +21,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; import javax.annotation.Nonnull; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; diff --git a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/OperationalDataTree.java b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/OperationalDataTree.java index 21672b48b..de737c729 100644 --- a/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/OperationalDataTree.java +++ b/v3po/data-impl/src/main/java/io/fd/honeycomb/v3po/data/impl/OperationalDataTree.java @@ -35,7 +35,7 @@ import java.util.Collection; import java.util.Map; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; @@ -75,7 +75,7 @@ public final class OperationalDataTree implements ReadableDataTree { */ public OperationalDataTree(@Nonnull BindingNormalizedNodeSerializer serializer, @Nonnull final SchemaContext globalContext, @Nonnull ReaderRegistry readerRegistry) { - this.globalContext = checkNotNull(globalContext, "serializer should not be null"); + this.globalContext = checkNotNull(globalContext, "globalContext should not be null"); this.serializer = checkNotNull(serializer, "serializer should not be null"); this.readerRegistry = checkNotNull(readerRegistry, "reader should not be null"); } |