diff options
author | 2016-05-17 09:10:39 +0200 | |
---|---|---|
committer | 2016-05-23 09:24:12 +0000 | |
commit | 799ee62f15dff07534beaf98a3ac551deffade38 (patch) | |
tree | a47c4696cf6ecff4fbb83c161c5d8e7e6b8af3c8 /v3po/translate-spi/src/main/java/io/fd | |
parent | f19306a9263cb8dd8c10a4867633fbbe14db2e4c (diff) |
HONEYCOMB-61: Add BA broker for context data tree
With broker, context data can be accessed in a transactional
manner, same as config data
+ Renamed data-api concepts to not include DataTree
+ Renamed context related concepts to better distinguish between them
+ Now passing full ReadContext to read customizers
+ Naming context is backed by context data broker
Change-Id: I0b2876dd74a31a9ced7d9b5145672868e12f8b82
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/translate-spi/src/main/java/io/fd')
2 files changed, 5 insertions, 4 deletions
diff --git a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/ListReaderCustomizer.java b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/ListReaderCustomizer.java index 857743e02..4a2e02cfb 100644 --- a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/ListReaderCustomizer.java +++ b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/ListReaderCustomizer.java @@ -17,7 +17,7 @@ package io.fd.honeycomb.v3po.translate.spi.read; import com.google.common.annotations.Beta; -import io.fd.honeycomb.v3po.translate.Context; +import io.fd.honeycomb.v3po.translate.read.ReadContext; import io.fd.honeycomb.v3po.translate.read.ReadFailedException; import java.util.List; import javax.annotation.Nonnull; @@ -46,7 +46,7 @@ public interface ListReaderCustomizer<C extends DataObject & Identifiable<K>, K * @throws ReadFailedException if the list of IDs could not be read */ @Nonnull - List<K> getAllIds(@Nonnull final InstanceIdentifier<C> id, @Nonnull final Context context) throws + List<K> getAllIds(@Nonnull final InstanceIdentifier<C> id, @Nonnull final ReadContext context) throws ReadFailedException; // TODO does it make sense with vpp APIs ? Should we replace it with a simple readAll ? diff --git a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/RootReaderCustomizer.java b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/RootReaderCustomizer.java index da599eb58..f0cb76860 100644 --- a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/RootReaderCustomizer.java +++ b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/read/RootReaderCustomizer.java @@ -17,8 +17,8 @@ package io.fd.honeycomb.v3po.translate.spi.read; import com.google.common.annotations.Beta; +import io.fd.honeycomb.v3po.translate.read.ReadContext; import io.fd.honeycomb.v3po.translate.read.ReadFailedException; -import io.fd.honeycomb.v3po.translate.Context; import javax.annotation.Nonnull; import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; @@ -45,8 +45,9 @@ public interface RootReaderCustomizer<C extends DataObject, B extends Builder<C> * * @param id id of current data object * @param builder builder for creating read value + * @param ctx * @throws ReadFailedException if read was unsuccessful */ void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id, @Nonnull final B builder, - @Nonnull final Context ctx) throws ReadFailedException; + @Nonnull final ReadContext ctx) throws ReadFailedException; } |