From 799ee62f15dff07534beaf98a3ac551deffade38 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Tue, 17 May 2016 09:10:39 +0200 Subject: 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 --- .../fd/honeycomb/v3po/translate/spi/read/ListReaderCustomizer.java | 4 ++-- .../fd/honeycomb/v3po/translate/spi/read/RootReaderCustomizer.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'v3po/translate-spi') 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, K * @throws ReadFailedException if the list of IDs could not be read */ @Nonnull - List getAllIds(@Nonnull final InstanceIdentifier id, @Nonnull final Context context) throws + List getAllIds(@Nonnull final InstanceIdentifier 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 * * @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 id, @Nonnull final B builder, - @Nonnull final Context ctx) throws ReadFailedException; + @Nonnull final ReadContext ctx) throws ReadFailedException; } -- cgit 1.2.3-korg