gpt4 book ai didi

org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.contains()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 16:38:40 26 4
gpt4 key购买 nike

本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.contains()方法的一些代码示例,展示了YangInstanceIdentifier.contains()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangInstanceIdentifier.contains()方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
类名称:YangInstanceIdentifier
方法名:contains

YangInstanceIdentifier.contains介绍

暂无

代码示例

代码示例来源:origin: opendaylight/controller

@Override
public boolean contains(final DOMDataTreeIdentifier other) {
  return datastoreType == other.datastoreType && rootIdentifier.contains(other.rootIdentifier);
}

代码示例来源:origin: org.opendaylight.mdsal/mdsal-dom-api

@Override
public boolean contains(final DOMDataTreeIdentifier other) {
  return datastoreType == other.datastoreType && rootIdentifier.contains(other.rootIdentifier);
}

代码示例来源:origin: org.opendaylight.yang-push/yangpush-impl

.nodeWithKey(fromNode, fromIdName, node_name).build();
boolean present = YangpushDomProvider.NETCONF_TOPO_IID.contains(iid);

代码示例来源:origin: org.opendaylight.mdsal/mdsal-dom-inmemory-datastore

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;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com