@Override public boolean contains(final DOMDataTreeIdentifier other) { return datastoreType == other.datastoreType && rootIdentifier.contains(other.rootIdentifier); }
@Override public boolean contains(final DOMDataTreeIdentifier other) { return datastoreType == other.datastoreType && rootIdentifier.contains(other.rootIdentifier); }
.nodeWithKey(fromNode, fromIdName, node_name).build(); boolean present = YangpushDomProvider.NETCONF_TOPO_IID.contains(iid);
private <L extends DOMDataTreeChangeListener> AbstractDOMDataTreeChangeListenerRegistration<L> setupListenerContext(final YangInstanceIdentifier listenerPath, final L listener) { // we need to register the listener registration path based on the shards root // we have to strip the shard path from the listener path and then register YangInstanceIdentifier strippedIdentifier = listenerPath; if (!shardPath.isEmpty()) { strippedIdentifier = YangInstanceIdentifier.create(stripShardPath(listenerPath)); } final DOMDataTreeListenerWithSubshards subshardListener = new DOMDataTreeListenerWithSubshards(dataTree, strippedIdentifier, listener); final AbstractDOMDataTreeChangeListenerRegistration<L> reg = setupContextWithoutSubshards(strippedIdentifier, subshardListener); for (final ChildShardContext maybeAffected : childShards.values()) { if (listenerPath.contains(maybeAffected.getPrefix().getRootIdentifier())) { // consumer has initialDataChangeEvent subshard somewhere on lower level // register to the notification manager with snapshot and forward child notifications to parent LOG.debug("Adding new subshard{{}} to listener at {}", maybeAffected.getPrefix(), listenerPath); subshardListener.addSubshard(maybeAffected); } else if (maybeAffected.getPrefix().getRootIdentifier().contains(listenerPath)) { // bind path is inside subshard // TODO can this happen? seems like in ShardedDOMDataTree we are // already registering to the lowest shard possible throw new UnsupportedOperationException("Listener should be registered directly " + "into initialDataChangeEvent subshard"); } } initialDataChangeEvent(listenerPath, listener); return reg; }