From 9779f4b3ffe24bb2338630c66169da92c880ffbb Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Fri, 3 Nov 2017 13:33:53 +0100 Subject: HONEYCOMB-359 - Wildcarded writers Adds option to specify subtree writer that can handle whole subtree of nodes without having whole subtree specified. Its checking if node is children at runtime, rather than having pre-computed tree Change-Id: Ic46f2bd6de84f0dd14865825399f5a90a1f80859 Signed-off-by: Jan Srnicek --- .../io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java | 8 -------- 1 file changed, 8 deletions(-) (limited to 'infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java') diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java index 02f1788f3..00a12e7ac 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java @@ -45,14 +45,6 @@ final class ApplicationRibWriterFactory implements WriterFactory { InstanceIdentifier.create(ApplicationRib.class); private static final InstanceIdentifier TABLES_IID = AR_IID.child(Tables.class); - - // TODO (HONEYCOMB-359): - // BGP models are huge, we need some kind of wildcarded subtree writer, that works for whole subtree. - // 1) we can either move checking handledTypes to writers (getHandledTypes, isAffected, writer.getHandedTypes, ...) - // but then precondition check in flatWriterRegistry might be slower (we need to check if we have all writers - // in order to avoid unnecessary reverts). - // - // 2) alternative is to compute all child nodes during initialization (might introduce some footprint penalty). @Override public void init(final ModifiableWriterRegistryBuilder registry) { registry.subtreeAdd(ImmutableSet.of(TABLES_IID), new BindingBrokerWriter<>(InstanceIdentifier.create(ApplicationRib.class), dataBroker) -- cgit 1.2.3-korg