Class PortStatsBuilder

  • All Implemented Interfaces:
    org.opendaylight.yangtools.concepts.Builder<PortStats>, org.opendaylight.yangtools.concepts.CheckedBuilder<PortStats,​IllegalArgumentException>, org.opendaylight.yangtools.concepts.Mutable, org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>

    public class PortStatsBuilder
    extends Object
    implements org.opendaylight.yangtools.concepts.Builder<PortStats>
    Class that builds PortStatsBuilder instances. Overall design of the class is that of a fluent interface, where method chaining is used.

    In general, this class is supposed to be used like this template:

       
         PortStatsBuilder createTarget(int fooXyzzy, int barBaz) {
             return new PortStatsBuilderBuilder()
                 .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
                 .setBar(new BarBuilder().setBaz(barBaz).build())
                 .build();
         }
       
     

    This pattern is supported by the immutable nature of PortStatsBuilder, as instances can be freely passed around without worrying about synchronization issues.

    As a side note: method chaining results in:

    • very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is on the stack, so further method invocations just need to fill method arguments for the next method invocation, which is terminated by build(), which is then returned from the method
    • better understanding by humans, as the scope of mutable state (the builder) is kept to a minimum and is very localized
    • better optimization oportunities, as the object scope is minimized in terms of invocation (rather than method) stack, making escape analysis a lot easier. Given enough compiler (JIT/AOT) prowess, the cost of th builder object can be completely eliminated
    See Also:
    PortStatsBuilder, Builder
    • Constructor Detail

      • PortStatsBuilder

        public PortStatsBuilder()
      • PortStatsBuilder

        public PortStatsBuilder​(PortStats base)
    • Method Detail

      • getCollisions

        public org.opendaylight.yangtools.yang.common.Uint64 getCollisions()
      • getDurationNsec

        public org.opendaylight.yangtools.yang.common.Uint32 getDurationNsec()
      • getDurationSec

        public org.opendaylight.yangtools.yang.common.Uint32 getDurationSec()
      • getPortNo

        public org.opendaylight.yangtools.yang.common.Uint32 getPortNo()
      • getRxBytes

        public org.opendaylight.yangtools.yang.common.Uint64 getRxBytes()
      • getRxCrcErr

        public org.opendaylight.yangtools.yang.common.Uint64 getRxCrcErr()
      • getRxDropped

        public org.opendaylight.yangtools.yang.common.Uint64 getRxDropped()
      • getRxErrors

        public org.opendaylight.yangtools.yang.common.Uint64 getRxErrors()
      • getRxFrameErr

        public org.opendaylight.yangtools.yang.common.Uint64 getRxFrameErr()
      • getRxOverErr

        public org.opendaylight.yangtools.yang.common.Uint64 getRxOverErr()
      • getRxPackets

        public org.opendaylight.yangtools.yang.common.Uint64 getRxPackets()
      • getTxBytes

        public org.opendaylight.yangtools.yang.common.Uint64 getTxBytes()
      • getTxDropped

        public org.opendaylight.yangtools.yang.common.Uint64 getTxDropped()
      • getTxErrors

        public org.opendaylight.yangtools.yang.common.Uint64 getTxErrors()
      • getTxPackets

        public org.opendaylight.yangtools.yang.common.Uint64 getTxPackets()
      • augmentation

        public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<PortStats>> E$$ augmentation​(Class<E$$> augmentationType)
      • setCollisions

        public PortStatsBuilder setCollisions​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setCollisions

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setCollisions​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setCollisions(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setDurationNsec

        public PortStatsBuilder setDurationNsec​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setDurationNsec

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setDurationNsec​(Long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setDurationNsec(Uint32)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setDurationSec

        public PortStatsBuilder setDurationSec​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setDurationSec

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setDurationSec​(Long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setDurationSec(Uint32)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setPortNo

        public PortStatsBuilder setPortNo​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setPortNo

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setPortNo​(Long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setPortNo(Uint32)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRxBytes

        public PortStatsBuilder setRxBytes​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setRxBytes

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setRxBytes​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setRxBytes(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRxCrcErr

        public PortStatsBuilder setRxCrcErr​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setRxCrcErr

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setRxCrcErr​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setRxCrcErr(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRxDropped

        public PortStatsBuilder setRxDropped​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setRxDropped

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setRxDropped​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setRxDropped(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRxErrors

        public PortStatsBuilder setRxErrors​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setRxErrors

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setRxErrors​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setRxErrors(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRxFrameErr

        public PortStatsBuilder setRxFrameErr​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setRxFrameErr

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setRxFrameErr​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setRxFrameErr(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRxOverErr

        public PortStatsBuilder setRxOverErr​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setRxOverErr

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setRxOverErr​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setRxOverErr(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setRxPackets

        public PortStatsBuilder setRxPackets​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setRxPackets

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setRxPackets​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setRxPackets(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setTxBytes

        public PortStatsBuilder setTxBytes​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setTxBytes

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setTxBytes​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setTxBytes(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setTxDropped

        public PortStatsBuilder setTxDropped​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setTxDropped

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setTxDropped​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setTxDropped(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setTxErrors

        public PortStatsBuilder setTxErrors​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setTxErrors

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setTxErrors​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setTxErrors(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • setTxPackets

        public PortStatsBuilder setTxPackets​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setTxPackets

        @Deprecated(forRemoval=true)
        public PortStatsBuilder setTxPackets​(BigInteger value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use {#link setTxPackets(Uint64)} instead.
        Utility migration setter.
        Parameters:
        value - field value in legacy type
        Returns:
        this builder
      • addAugmentation

        public PortStatsBuilder addAugmentation​(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortStats>> augmentationType,
                                                org.opendaylight.yangtools.yang.binding.Augmentation<PortStats> augmentationValue)
      • removeAugmentation

        public PortStatsBuilder removeAugmentation​(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<PortStats>> augmentationType)