+ private void processSupportedFamilyRoutes(final DataTreeCandidateNode child) {
+ for (final DataTreeCandidateNode route : this.support.changedRoutes(child)) {
+ processRouteChange(route);
+ }
+ }
+
+ private void processRouteChange(final DataTreeCandidateNode route) {
+ final Update update;
+ switch (route.getModificationType()) {
+ case UNMODIFIED:
+ LOG.debug("Skipping unmodified route {}", route.getIdentifier());
+ return;
+ case DELETE:
+ case DISAPPEARED:
+ // FIXME: we can batch deletions into a single batch
+ update = withdraw((MapEntryNode) route.getDataBefore().get());
+ LOG.debug("Withdrawing routes {}", update);
+ break;
+ case APPEARED:
+ case SUBTREE_MODIFIED:
+ case WRITE:
+ update = advertise((MapEntryNode) route.getDataAfter().get());
+ LOG.debug("Advertising routes {}", update);
+ break;
+ default:
+ LOG.warn("Ignoring unhandled modification type {}", route.getModificationType());
+ return;
+ }
+ this.session.write(update);
+ }
+