Class ProfileBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.genius.alivenessmonitor.rev160411.monitor.profile.get.input.ProfileBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<Profile>
,org.opendaylight.yangtools.concepts.CheckedBuilder<Profile,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
public class ProfileBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<Profile>
Class that buildsProfileBuilder
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:
ProfileBuilder createTarget(int fooXyzzy, int barBaz) { return new ProfileBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of ProfileBuilder, 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:
ProfileBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description ProfileBuilder()
ProfileBuilder(BfdParams arg)
ProfileBuilder(Profile base)
ProfileBuilder(MonitorProfileParams arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ProfileBuilder
addAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Profile>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Profile> augmentationValue)
<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Profile>>
E$$augmentation(java.lang.Class<E$$> augmentationType)
Profile
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.java.lang.String
getCheckTnlKey()
java.lang.String
getCpathDown()
org.opendaylight.yangtools.yang.common.Uint32
getDecayMinRx()
org.opendaylight.yangtools.yang.common.Uint32
getFailureThreshold()
java.lang.String
getForwardingIfRx()
org.opendaylight.yangtools.yang.common.Uint32
getMinRx()
org.opendaylight.yangtools.yang.common.Uint32
getMinTx()
org.opendaylight.yangtools.yang.common.Uint32
getMonitorInterval()
org.opendaylight.yangtools.yang.common.Uint32
getMonitorWindow()
MonitorProtocolType
getProtocolType()
ProfileBuilder
removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Profile>> augmentationType)
ProfileBuilder
setCheckTnlKey(java.lang.String value)
ProfileBuilder
setCpathDown(java.lang.String value)
ProfileBuilder
setDecayMinRx(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setDecayMinRx(Uint32)} instead.ProfileBuilder
setDecayMinRx(org.opendaylight.yangtools.yang.common.Uint32 value)
ProfileBuilder
setFailureThreshold(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setFailureThreshold(Uint32)} instead.ProfileBuilder
setFailureThreshold(org.opendaylight.yangtools.yang.common.Uint32 value)
ProfileBuilder
setForwardingIfRx(java.lang.String value)
ProfileBuilder
setMinRx(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMinRx(Uint32)} instead.ProfileBuilder
setMinRx(org.opendaylight.yangtools.yang.common.Uint32 value)
ProfileBuilder
setMinTx(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMinTx(Uint32)} instead.ProfileBuilder
setMinTx(org.opendaylight.yangtools.yang.common.Uint32 value)
ProfileBuilder
setMonitorInterval(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMonitorInterval(Uint32)} instead.ProfileBuilder
setMonitorInterval(org.opendaylight.yangtools.yang.common.Uint32 value)
ProfileBuilder
setMonitorWindow(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMonitorWindow(Uint32)} instead.ProfileBuilder
setMonitorWindow(org.opendaylight.yangtools.yang.common.Uint32 value)
ProfileBuilder
setProtocolType(MonitorProtocolType value)
-
-
-
Constructor Detail
-
ProfileBuilder
public ProfileBuilder()
-
ProfileBuilder
public ProfileBuilder(MonitorProfileParams arg)
-
ProfileBuilder
public ProfileBuilder(BfdParams arg)
-
ProfileBuilder
public ProfileBuilder(Profile base)
-
-
Method Detail
-
fieldsFrom
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument. Valid argument is instance of one of following types:- org.opendaylight.yang.gen.v1.urn.opendaylight.genius.alivenessmonitor.rev160411.MonitorProfileParams
- org.opendaylight.yang.gen.v1.urn.opendaylight.genius.alivenessmonitor.rev160411.BfdParams
- Parameters:
arg
- grouping object- Throws:
java.lang.IllegalArgumentException
- if given argument is none of valid types
-
getCheckTnlKey
public java.lang.String getCheckTnlKey()
-
getCpathDown
public java.lang.String getCpathDown()
-
getDecayMinRx
public org.opendaylight.yangtools.yang.common.Uint32 getDecayMinRx()
-
getFailureThreshold
public org.opendaylight.yangtools.yang.common.Uint32 getFailureThreshold()
-
getForwardingIfRx
public java.lang.String getForwardingIfRx()
-
getMinRx
public org.opendaylight.yangtools.yang.common.Uint32 getMinRx()
-
getMinTx
public org.opendaylight.yangtools.yang.common.Uint32 getMinTx()
-
getMonitorInterval
public org.opendaylight.yangtools.yang.common.Uint32 getMonitorInterval()
-
getMonitorWindow
public org.opendaylight.yangtools.yang.common.Uint32 getMonitorWindow()
-
getProtocolType
public MonitorProtocolType getProtocolType()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Profile>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
setCheckTnlKey
public ProfileBuilder setCheckTnlKey(java.lang.String value)
-
setCpathDown
public ProfileBuilder setCpathDown(java.lang.String value)
-
setDecayMinRx
public ProfileBuilder setDecayMinRx(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setDecayMinRx
@Deprecated(forRemoval=true) public ProfileBuilder setDecayMinRx(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setDecayMinRx(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setFailureThreshold
public ProfileBuilder setFailureThreshold(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setFailureThreshold
@Deprecated(forRemoval=true) public ProfileBuilder setFailureThreshold(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setFailureThreshold(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setForwardingIfRx
public ProfileBuilder setForwardingIfRx(java.lang.String value)
-
setMinRx
public ProfileBuilder setMinRx(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setMinRx
@Deprecated(forRemoval=true) public ProfileBuilder setMinRx(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMinRx(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setMinTx
public ProfileBuilder setMinTx(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setMinTx
@Deprecated(forRemoval=true) public ProfileBuilder setMinTx(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMinTx(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setMonitorInterval
public ProfileBuilder setMonitorInterval(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setMonitorInterval
@Deprecated(forRemoval=true) public ProfileBuilder setMonitorInterval(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMonitorInterval(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setMonitorWindow
public ProfileBuilder setMonitorWindow(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setMonitorWindow
@Deprecated(forRemoval=true) public ProfileBuilder setMonitorWindow(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setMonitorWindow(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setProtocolType
public ProfileBuilder setProtocolType(MonitorProtocolType value)
-
addAugmentation
public ProfileBuilder addAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Profile>> augmentationType, org.opendaylight.yangtools.yang.binding.Augmentation<Profile> augmentationValue)
-
removeAugmentation
public ProfileBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Profile>> augmentationType)
-
-