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 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,E> requestSchemaTreeChild(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 through NamespaceBehaviour.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) and SchemaTreeNamespace.getFrom(NamespaceStorageNode, QName).

      Parameters:
      qname - node identifier of the child being requested
      Returns:
      Requested child, if it is present.
      Throws:
      NullPointerException - in qname is null