summaryrefslogtreecommitdiffstats
path: root/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-11-03 13:33:53 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-11-03 12:58:01 +0000
commit9779f4b3ffe24bb2338630c66169da92c880ffbb (patch)
treefac37c53b70b7bbfcea00f180554b3a0dfddd59c /infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java
parent054eb07de938df56000a8fc5cb41cb77f84bf2b5 (diff)
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 <jsrnicek@cisco.com>
Diffstat (limited to 'infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java')
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/ApplicationRibWriterFactory.java8
1 files changed, 0 insertions, 8 deletions
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> 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)