private static final Logger LOG = LoggerFactory.getLogger(LocRibWriter.class);
private static final LeafNode<Boolean> ATTRIBUTES_UPTODATE_TRUE = ImmutableNodes.leafNode(QName.create(Attributes.QNAME, "uptodate"), Boolean.TRUE);
+ private static final NodeIdentifier ROUTES_IDENTIFIER = new NodeIdentifier(Routes.QNAME);
private final Map<PathArgument, AbstractRouteEntry> routeEntries = new HashMap<>();
private final YangInstanceIdentifier locRibTarget;
value = null;
}
- final YangInstanceIdentifier writePath = this.ribSupport.routePath(this.locRibTarget.node(Routes.QNAME), e.getKey().getRouteId());
+ final YangInstanceIdentifier writePath = this.ribSupport.routePath(this.locRibTarget.node(ROUTES_IDENTIFIER), e.getKey().getRouteId());
if (value != null) {
LOG.debug("Write route to LocRib {}", value);
tx.put(LogicalDatastoreType.OPERATIONAL, writePath, value);
* @param listClass Binding class of the route list, nust not be null;
*/
protected AbstractRIBSupport(final Class<? extends Routes> cazeClass, final Class<? extends DataObject> containerClass, final Class<? extends Route> listClass) {
- final QName qname = BindingReflections.findQName(containerClass);
+ final QName qname = QName.cachedReference(BindingReflections.findQName(containerClass));
this.routesContainerIdentifier = new NodeIdentifier(qname);
this.routeAttributesIdentifier = new NodeIdentifier(QName.cachedReference(QName.create(qname, Attributes.QNAME.getLocalName())));
this.cazeClass = Preconditions.checkNotNull(cazeClass);
this.containerClass = Preconditions.checkNotNull(containerClass);
this.listClass = Preconditions.checkNotNull(listClass);
- this.routesListIdentifier = new NodeIdentifier(BindingReflections.findQName(listClass));
+ this.routesListIdentifier = new NodeIdentifier(QName.cachedReference(BindingReflections.findQName(listClass)));
}
@Override