- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.getParent()
方法的一些代码示例,展示了YangInstanceIdentifier.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangInstanceIdentifier.getParent()
方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
类名称:YangInstanceIdentifier
方法名:getParent
[英]Return the conceptual parent YangInstanceIdentifier, which has one item less in #getPathArguments().
[中]返回概念父InstanceIdentifier,它在#getPathArguments()中少了一项。
代码示例来源:origin: opendaylight/controller
@Override
public final void exit(final int depth) {
Preconditions.checkArgument(depth >= 0);
YangInstanceIdentifier next = current;
for (int i = 0; i < depth; ++i) {
next = next.getParent();
Preconditions.checkState(next != null);
}
current = next;
}
代码示例来源:origin: org.opendaylight.controller/sal-binding-broker-impl
/**
* @deprecated Use {@link YangInstanceIdentifier#getParent()} instead.
*/
@Deprecated
protected static Optional<YangInstanceIdentifier> getParent(final YangInstanceIdentifier child) {
return Optional.fromNullable(child.getParent());
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding-dom-adapter
/**
* Use {@link YangInstanceIdentifier#getParent()} instead.
*/
@Deprecated
protected static Optional<YangInstanceIdentifier> getParent(final YangInstanceIdentifier child) {
return Optional.ofNullable(child.getParent());
}
代码示例来源:origin: org.opendaylight.controller/sal-clustering-commons
@Override
public final void exit(final int depth) {
Preconditions.checkArgument(depth >= 0);
YangInstanceIdentifier next = current;
for (int i = 0; i < depth; ++i) {
next = next.getParent();
Preconditions.checkState(next != null);
}
current = next;
}
代码示例来源:origin: io.fd.honeycomb.infra/test-tools
@Nonnull
default Optional<YangInstanceIdentifier> getNodeParent(@Nonnull final YangInstanceIdentifier identifier) {
return Optional.ofNullable(identifier.getParent());
}
代码示例来源:origin: org.opendaylight.yangtools/yang-data-api
private static int calculateSize(final YangInstanceIdentifier parent) {
YangInstanceIdentifier current = parent;
for (int i = 1;; ++i) {
final Collection<PathArgument> args = current.tryReversePathArguments();
if (args != null) {
return i + args.size();
}
verify(current instanceof StackedYangInstanceIdentifier);
current = current.getParent();
}
}
代码示例来源:origin: opendaylight/controller
@Override
public final void exit() {
Preconditions.checkState(!current.isEmpty());
current = Verify.verifyNotNull(current.getParent());
}
代码示例来源:origin: opendaylight/yangtools
private static int calculateSize(final YangInstanceIdentifier parent) {
YangInstanceIdentifier current = parent;
for (int i = 1;; ++i) {
final Collection<PathArgument> args = current.tryReversePathArguments();
if (args != null) {
return i + args.size();
}
verify(current instanceof StackedYangInstanceIdentifier);
current = current.getParent();
}
}
代码示例来源:origin: org.opendaylight.controller/sal-clustering-commons
@Override
public final void exit() {
Preconditions.checkState(!current.isEmpty());
current = Verify.verifyNotNull(current.getParent());
}
代码示例来源:origin: org.opendaylight.yangtools/yang-data-api
@Nonnull
@Override
public YangInstanceIdentifier getAncestor(final int depth) {
checkArgument(depth >= 0, "Steps cannot be negative");
// Calculate how far up our FixedYangInstanceIdentifier ancestor is
int stackedDepth = 1;
YangInstanceIdentifier wlk = getParent();
while (wlk instanceof StackedYangInstanceIdentifier) {
wlk = wlk.getParent();
stackedDepth++;
}
// Guaranteed to come from FixedYangInstanceIdentifier
final int fixedDepth = wlk.getPathArguments().size();
if (fixedDepth >= depth) {
return wlk.getAncestor(depth);
}
// Calculate our depth and check argument
final int ourDepth = stackedDepth + fixedDepth;
checkArgument(depth <= ourDepth, "Depth %s exceeds maximum depth %s", depth, ourDepth);
// Requested depth is covered by the stack, traverse up for specified number of steps
final int toWalk = ourDepth - depth;
YangInstanceIdentifier result = this;
for (int i = 0; i < toWalk; ++i) {
result = result.getParent();
}
return result;
}
代码示例来源:origin: opendaylight/yangtools
@Nonnull
@Override
public YangInstanceIdentifier getAncestor(final int depth) {
checkArgument(depth >= 0, "Steps cannot be negative");
// Calculate how far up our FixedYangInstanceIdentifier ancestor is
int stackedDepth = 1;
YangInstanceIdentifier wlk = getParent();
while (wlk instanceof StackedYangInstanceIdentifier) {
wlk = wlk.getParent();
stackedDepth++;
}
// Guaranteed to come from FixedYangInstanceIdentifier
final int fixedDepth = wlk.getPathArguments().size();
if (fixedDepth >= depth) {
return wlk.getAncestor(depth);
}
// Calculate our depth and check argument
final int ourDepth = stackedDepth + fixedDepth;
checkArgument(depth <= ourDepth, "Depth %s exceeds maximum depth %s", depth, ourDepth);
// Requested depth is covered by the stack, traverse up for specified number of steps
final int toWalk = ourDepth - depth;
YangInstanceIdentifier result = this;
for (int i = 0; i < toWalk; ++i) {
result = result.getParent();
}
return result;
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
if (!routeTableIdentifier.equals(childIdentifier.getParent().getParent().getParent())) {
processRoutesTable(child, childIdentifier, tx, routeTableIdentifier);
break;
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
public static String entityTypeFromEntityPath(YangInstanceIdentifier entityPath){
YangInstanceIdentifier parent = entityPath;
while(!parent.isEmpty()) {
if (EntityType.QNAME.equals(parent.getLastPathArgument().getNodeType())) {
YangInstanceIdentifier.NodeIdentifierWithPredicates entityTypeLastPathArgument = (YangInstanceIdentifier.NodeIdentifierWithPredicates) parent.getLastPathArgument();
return (String) entityTypeLastPathArgument.getKeyValues().get(ENTITY_TYPE_QNAME);
}
parent = parent.getParent();
}
return null;
}
代码示例来源:origin: org.opendaylight.controller/sal-binding-broker-impl
final Entry<YangInstanceIdentifier, NormalizedNode<?, ?>> normalized) {
if (Identifiable.class.isAssignableFrom(path.getTargetType())) {
YangInstanceIdentifier parentMapPath = normalized.getKey().getParent();
Preconditions.checkArgument(parentMapPath != null, "Map path %s does not have a parent", path);
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding2-dom-adapter
final Entry<YangInstanceIdentifier, NormalizedNode<?, ?>> normalized) {
if (IdentifiableItem.class.isAssignableFrom(path.getTargetType())) {
final YangInstanceIdentifier parentMapPath = normalized.getKey().getParent();
Preconditions.checkArgument(parentMapPath != null, "Map path %s does not have a parent", path);
代码示例来源:origin: opendaylight/yangtools
private static void applyToCursorAwareModification(final CursorAwareDataTreeModification modification,
final DataTreeCandidate candidate) {
final YangInstanceIdentifier candidatePath = candidate.getRootPath();
if (candidatePath.isEmpty()) {
try (DataTreeModificationCursor cursor = modification.openCursor()) {
DataTreeCandidateNodes.applyRootToCursor(cursor, candidate.getRootNode());
}
} else {
try (DataTreeModificationCursor cursor = modification.openCursor(candidatePath.getParent()).get()) {
DataTreeCandidateNodes.applyRootedNodeToCursor(cursor, candidatePath, candidate.getRootNode());
}
}
}
代码示例来源:origin: org.opendaylight.yangtools/yang-data-api
private static void applyToCursorAwareModification(final CursorAwareDataTreeModification modification,
final DataTreeCandidate candidate) {
final YangInstanceIdentifier candidatePath = candidate.getRootPath();
if (candidatePath.isEmpty()) {
try (DataTreeModificationCursor cursor = modification.openCursor()) {
DataTreeCandidateNodes.applyRootToCursor(cursor, candidate.getRootNode());
}
} else {
try (DataTreeModificationCursor cursor = modification.openCursor(candidatePath.getParent()).get()) {
DataTreeCandidateNodes.applyRootedNodeToCursor(cursor, candidatePath, candidate.getRootNode());
}
}
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding-dom-adapter
/**
* Subclasses of this class are required to implement creation of parent nodes based on behaviour of their
* underlying transaction.
*
* @param store an instance of LogicalDatastoreType
* @param domPath an instance of YangInstanceIdentifier
* @param path an instance of InstanceIdentifier
*/
protected final void ensureParentsByMerge(final LogicalDatastoreType store, final YangInstanceIdentifier domPath,
final InstanceIdentifier<?> path) {
final YangInstanceIdentifier parentPath = domPath.getParent();
if (parentPath != null) {
final NormalizedNode<?, ?> parentNode = getCodec().instanceIdentifierToNode(parentPath);
getDelegate().merge(store, YangInstanceIdentifier.create(parentNode.getIdentifier()), parentNode);
}
}
代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding2-dom-adapter
/**
* Subclasses of this class are required to implement creation of parent nodes based on behavior of their
* underlying transaction.
*
* @param store
* - an instance of LogicalDatastoreType
* @param domPath
* - an instance of YangInstanceIdentifier
* @param path
* - an instance of InstanceIdentifier
*/
protected final void ensureParentsByMerge(final LogicalDatastoreType store, final YangInstanceIdentifier domPath,
final InstanceIdentifier<?> path) {
final YangInstanceIdentifier parentPath = domPath.getParent();
if (parentPath != null) {
final NormalizedNode<?, ?> parentNode = getCodec().instanceIdentifierToNode(parentPath);
getDelegate().merge(store, YangInstanceIdentifier.create(parentNode.getIdentifier()), parentNode);
}
}
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.of()方法的一些代码示例,展示了YangInsta
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.toString()方法的一些代码示例,展示了Yan
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.getParent()方法的一些代码示例,展示了Ya
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.toOptimized()方法的一些代码示例,展示了
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.isEmpty()方法的一些代码示例,展示了Yang
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.equals()方法的一些代码示例,展示了YangI
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.getAncestor()方法的一些代码示例,展示了
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.contains()方法的一些代码示例,展示了Yan
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.hashCode()方法的一些代码示例,展示了Yan
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.builder()方法的一些代码示例,展示了Yang
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.node()方法的一些代码示例,展示了YangIns
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.getLastPathArgument()方法的一些
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.getPathArguments()方法的一些代码示
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.create()方法的一些代码示例,展示了YangI
我是一名优秀的程序员,十分优秀!