Class VpnConfigBuilder

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

    public class VpnConfigBuilder
    extends java.lang.Object
    implements org.opendaylight.yangtools.concepts.Builder<VpnConfig>
    Class that builds VpnConfigBuilder 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:

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

    This pattern is supported by the immutable nature of VpnConfigBuilder, 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:
    VpnConfigBuilder, Builder
    • Constructor Detail

      • VpnConfigBuilder

        public VpnConfigBuilder()
      • VpnConfigBuilder

        public VpnConfigBuilder​(VpnConfig base)
    • Method Detail

      • getBootDelayArpLearning

        public org.opendaylight.yangtools.yang.common.Uint32 getBootDelayArpLearning()
      • getIpLearnTimeout

        public org.opendaylight.yangtools.yang.common.Uint32 getIpLearnTimeout()
      • getIpv6NdMonitorFailureThreshold

        public org.opendaylight.yangtools.yang.common.Uint32 getIpv6NdMonitorFailureThreshold()
      • getIpv6NdMonitorInterval

        public org.opendaylight.yangtools.yang.common.Uint32 getIpv6NdMonitorInterval()
      • getIpv6NdMonitorWindow

        public org.opendaylight.yangtools.yang.common.Uint32 getIpv6NdMonitorWindow()
      • getMigrateIpCacheSize

        public org.opendaylight.yangtools.yang.common.Uint64 getMigrateIpCacheSize()
      • getSubnetRoutePuntTimeout

        public org.opendaylight.yangtools.yang.common.Uint32 getSubnetRoutePuntTimeout()
      • augmentation

        public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<VpnConfig>> E$$ augmentation​(java.lang.Class<E$$> augmentationType)
      • setBootDelayArpLearning

        public VpnConfigBuilder setBootDelayArpLearning​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setBootDelayArpLearning

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

        public VpnConfigBuilder setIpLearnTimeout​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setIpLearnTimeout

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

        public VpnConfigBuilder setIpv6NdMonitorFailureThreshold​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setIpv6NdMonitorFailureThreshold

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

        public VpnConfigBuilder setIpv6NdMonitorInterval​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setIpv6NdMonitorInterval

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

        public VpnConfigBuilder setIpv6NdMonitorWindow​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setIpv6NdMonitorWindow

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

        public VpnConfigBuilder setMigrateIpCacheSize​(org.opendaylight.yangtools.yang.common.Uint64 value)
      • setMigrateIpCacheSize

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

        public VpnConfigBuilder setSubnetRoutePuntTimeout​(org.opendaylight.yangtools.yang.common.Uint32 value)
      • setSubnetRoutePuntTimeout

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

        public VpnConfigBuilder addAugmentation​(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<VpnConfig>> augmentationType,
                                                org.opendaylight.yangtools.yang.binding.Augmentation<VpnConfig> augmentationValue)
      • removeAugmentation

        public VpnConfigBuilder removeAugmentation​(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<VpnConfig>> augmentationType)
      • build

        public VpnConfig build()
        Specified by:
        build in interface org.opendaylight.yangtools.concepts.Builder<VpnConfig>
        Specified by:
        build in interface org.opendaylight.yangtools.concepts.CheckedBuilder<VpnConfig,​java.lang.IllegalArgumentException>