Interface BindingDataObjectCodecTreeNode<T extends DataObject>

    • Method Detail

      • streamChild

        <E extends DataObject> @NonNull BindingDataObjectCodecTreeNode<E> streamChild​(@NonNull Class<E> childClass)
        Returns child context as if it was walked by BindingStreamEventWriter. This means that to enter case, one must issue getChild(ChoiceClass).getChild(CaseClass).
        Parameters:
        childClass - Child class by Binding Stream navigation
        Returns:
        Context of child
        Throws:
        IllegalArgumentException - If supplied child class is not valid in specified context.
      • possibleStreamChild

        <E extends DataObjectOptional<? extends BindingDataObjectCodecTreeNode<E>> possibleStreamChild​(@NonNull Class<E> childClass)
        Returns child context as if it was walked by BindingStreamEventWriter. This means that to enter case, one must issue getChild(ChoiceClass).getChild(CaseClass).

        This method differs from streamChild(Class), that is less strict for interfaces representing augmentation and cases, that may return BindingCodecTreeNode even if augmentation interface containing same data was supplied and does not represent augmentation of this node.

        Parameters:
        childClass - Child class by Binding Stream navigation
        Returns:
        Context of child or Optional.empty is supplied class is not applicable in context.
      • bindingPathArgumentChild

        @NonNull BindingDataObjectCodecTreeNode<?> bindingPathArgumentChild​(@NonNull InstanceIdentifier.PathArgument arg,
                                                                            @Nullable List<YangInstanceIdentifier.PathArgument> builder)
        Returns nested node context using supplied Binding Instance Identifier and adds YANG instance identifiers to the supplied list.
        Parameters:
        arg - Binding Instance Identifier Argument
        builder - Mutable instance of list, which is appended by YangInstanceIdentifiers as tree is walked. Use null if such side-product is not needed.
        Returns:
        Context of child
        Throws:
        IllegalArgumentException - If supplied argument does not represent valid child.
      • serializePathArgument

        @Beta
        @Nullable YangInstanceIdentifier.PathArgument serializePathArgument​(@Nullable InstanceIdentifier.PathArgument arg)
        Serializes path argument for current node.
        Parameters:
        arg - Binding Path Argument, may be null if Binding Instance Identifier does not have representation for current node (e.g. choice or case).
        Returns:
        Yang Path Argument, may be null if Yang Instance Identifier does not have representation for current node (e.g. case).
        Throws:
        IllegalArgumentException - If supplied arg is not valid.
      • deserializePathArgument

        @Beta
        @Nullable InstanceIdentifier.PathArgument deserializePathArgument​(@Nullable YangInstanceIdentifier.PathArgument arg)
        Deserializes path argument for current node.
        Parameters:
        arg - Yang Path Argument, may be null if Yang Instance Identifier does not have representation for current node (e.g. case).
        Returns:
        Binding Path Argument, may be null if Binding Instance Identifier does not have representation for current node (e.g. choice or case).
        Throws:
        IllegalArgumentException - If supplied arg is not valid.
      • getChildAddressabilitySummary

        @NonNull BindingDataObjectCodecTreeNode.ChildAddressabilitySummary getChildAddressabilitySummary()
        Return a summary of addressability of potential children. Binding specification does not allow all DOM tree elements to be directly addressed, which means some recursive tree operations, like data tree changes do not have a one-to-one mapping from DOM to binding in all cases. This method provides an optimization hint to guide translation of data structures, allowing for fast paths when all children are known to either be addressable or non-addressable.
        Returns:
        Summary children addressability.
      • createCachingCodec

        @NonNull BindingNormalizedNodeCachingCodec<T> createCachingCodec​(@NonNull ImmutableCollection<Class<? extends BindingObject>> cacheSpecifier)
        Returns codec which uses caches serialization / deserialization results.

        Caching may introduce performance penalty to serialization / deserialization but may decrease use of heap for repetitive objects.

        Parameters:
        cacheSpecifier - Set of objects, for which cache may be in place
        Returns:
        Codec which uses cache for serialization / deserialization.