Interface NamespaceBehaviour.OnDemandSchemaTreeStorageNode
- All Superinterfaces:
NamespaceBehaviour.NamespaceStorageNode
- Enclosing class:
- NamespaceBehaviour<K,
V, N extends ParserNamespace<K, V>>
@Beta
public static interface NamespaceBehaviour.OnDemandSchemaTreeStorageNode
extends NamespaceBehaviour.NamespaceStorageNode
Interface implemented by
NamespaceBehaviour.NamespaceStorageNodes which support dynamic addition of child elements as they
are requested. This means that such a node can, defer creation of child namespace storage nodes, in effect lazily
expanding this namespace on an if-needed basis.-
Method Summary
Modifier and TypeMethodDescription<D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>,E extends org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement<D>>
@Nullable StmtContext<QName,D, E> requestSchemaTreeChild(QName qname) Request that a new member of this node's schema tree statement be added.Methods inherited from interface org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.NamespaceStorageNode
getAllFromLocalStorage, getFromLocalStorage, getParentNamespaceStorage, getStorageNodeType, putToLocalStorage, putToLocalStorageIfAbsent
-
Method Details
-
requestSchemaTreeChild
<D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>,E extends org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement<D>> @Nullable StmtContext<QName,D, requestSchemaTreeChildE> (QName qname) Request that a new member of this node's schema tree statement be added. Implementations are required to perform lookup in their internal structure and create a child if tractable. Resulting node is expected to have been registered with local storage, so that it is accessible throughNamespaceBehaviour.NamespaceStorageNode.getFromLocalStorage(Class, Object).This method must not change its mind about a child's presence -- once it returns non-present, it has to be always returning non-present.
The results produced by this method are expected to be consistent with
SchemaTreeAwareEffectiveStatement.findSchemaTreeNode(QName)andSchemaTreeNamespace.getFrom(NamespaceStorageNode, QName).- Parameters:
qname- node identifier of the child being requested- Returns:
- Requested child, if it is present.
- Throws:
NullPointerException- inqnameis null
-