+
+ /**
+ * To send routes out, we'd need to transform the DOM representation of route to
+ * binding-aware format. This needs to be done per each AFI/SAFI.
+ *
+ * @param advertised Collection of advertised routes in DOM format
+ * @param withdrawn Collection of withdrawn routes in DOM format
+ * @param attr Attributes MpReach is part of Attributes so we need to pass
+ * it as argument, create new AttributesBuilder with existing
+ * attributes and add MpReach
+ * @return Update message ready to be sent out
+ */
+ @Nonnull
+ Update buildUpdate(@Nonnull Collection<MapEntryNode> advertised,
+ @Nonnull Collection<MapEntryNode> withdrawn, @Nonnull Attributes attr);
+
+ @Nonnull
+ Class<? extends AddressFamily> getAfi();
+
+ @Nonnull
+ Class<? extends SubsequentAddressFamily> getSafi();
+
+ interface ApplyRoute {
+ void apply(@Nonnull DOMDataWriteTransaction tx, @Nonnull YangInstanceIdentifier base,
+ @Nonnull NodeIdentifierWithPredicates routeKey,
+ @Nonnull DataContainerNode<?> route, ContainerNode attributes);
+ }