Class DataStorePropertiesContainerBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStorePropertiesContainerBuilder
-
- All Implemented Interfaces:
Builder<DataStorePropertiesContainer>
,CheckedBuilder<DataStorePropertiesContainer,IllegalArgumentException>
,Mutable
,MutationBehaviour<Mutable>
public class DataStorePropertiesContainerBuilder extends Object implements Builder<DataStorePropertiesContainer>
Class that buildsDataStorePropertiesContainerBuilder
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:
DataStorePropertiesContainerBuilder createTarget(int fooXyzzy, int barBaz) { return new DataStorePropertiesContainerBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of DataStorePropertiesContainerBuilder, 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:
DataStorePropertiesContainerBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description DataStorePropertiesContainerBuilder()
DataStorePropertiesContainerBuilder(DataStoreProperties arg)
DataStorePropertiesContainerBuilder(DataStorePropertiesContainer base)
-
Method Summary
-
-
-
Constructor Detail
-
DataStorePropertiesContainerBuilder
public DataStorePropertiesContainerBuilder()
-
DataStorePropertiesContainerBuilder
public DataStorePropertiesContainerBuilder(DataStoreProperties arg)
-
DataStorePropertiesContainerBuilder
public DataStorePropertiesContainerBuilder(DataStorePropertiesContainer base)
-
-
Method Detail
-
fieldsFrom
public void fieldsFrom(DataObject arg)
Set fields from given grouping argument. Valid argument is instance of one of following types:- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStoreProperties
- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types
-
getBackendAlivenessTimerIntervalInSeconds
public NonZeroUint32Type getBackendAlivenessTimerIntervalInSeconds()
-
getBoundedMailboxCapacity
public NonZeroUint32Type getBoundedMailboxCapacity()
-
getCustomRaftPolicyImplementation
public String getCustomRaftPolicyImplementation()
-
getFileBackedStreamingThresholdInMegabytes
public NonZeroUint32Type getFileBackedStreamingThresholdInMegabytes()
-
getFrontendNoProgressTimeoutInSeconds
public NonZeroUint32Type getFrontendNoProgressTimeoutInSeconds()
-
getFrontendRequestTimeoutInSeconds
public NonZeroUint32Type getFrontendRequestTimeoutInSeconds()
-
getInitialPayloadSerializedBufferCapacity
public NonZeroUint32Type getInitialPayloadSerializedBufferCapacity()
-
getInitialSettleTimeoutMultiplier
public Uint32 getInitialSettleTimeoutMultiplier()
-
getMaxShardDataChangeExecutorPoolSize
public NonZeroUint32Type getMaxShardDataChangeExecutorPoolSize()
-
getMaxShardDataChangeExecutorQueueSize
public NonZeroUint32Type getMaxShardDataChangeExecutorQueueSize()
-
getMaxShardDataChangeListenerQueueSize
public NonZeroUint32Type getMaxShardDataChangeListenerQueueSize()
-
getMaxShardDataStoreExecutorQueueSize
public NonZeroUint32Type getMaxShardDataStoreExecutorQueueSize()
-
getMaximumMessageSliceSize
public NonZeroUint32Type getMaximumMessageSliceSize()
-
getOperationTimeoutInSeconds
public OperationTimeoutType getOperationTimeoutInSeconds()
-
getRecoverySnapshotIntervalSeconds
public Uint32 getRecoverySnapshotIntervalSeconds()
-
getShardBatchedModificationCount
public NonZeroUint32Type getShardBatchedModificationCount()
-
getShardCommitQueueExpiryTimeoutInSeconds
public NonZeroUint32Type getShardCommitQueueExpiryTimeoutInSeconds()
-
getShardElectionTimeoutFactor
public NonZeroUint32Type getShardElectionTimeoutFactor()
-
getShardHeartbeatIntervalInMillis
public HeartbeatIntervalType getShardHeartbeatIntervalInMillis()
-
getShardInitializationTimeoutInSeconds
public NonZeroUint32Type getShardInitializationTimeoutInSeconds()
-
getShardIsolatedLeaderCheckIntervalInMillis
public HeartbeatIntervalType getShardIsolatedLeaderCheckIntervalInMillis()
-
getShardJournalRecoveryLogBatchSize
public NonZeroUint32Type getShardJournalRecoveryLogBatchSize()
-
getShardLeaderElectionTimeoutInSeconds
public NonZeroUint32Type getShardLeaderElectionTimeoutInSeconds()
-
getShardSnapshotBatchCount
public NonZeroUint32Type getShardSnapshotBatchCount()
-
getShardSnapshotChunkSize
public NonZeroUint32Type getShardSnapshotChunkSize()
-
getShardSnapshotDataThreshold
public Uint32 getShardSnapshotDataThreshold()
-
getShardSnapshotDataThresholdPercentage
public Percentage getShardSnapshotDataThresholdPercentage()
-
getShardTransactionCommitQueueCapacity
public NonZeroUint32Type getShardTransactionCommitQueueCapacity()
-
getShardTransactionCommitTimeoutInSeconds
public NonZeroUint32Type getShardTransactionCommitTimeoutInSeconds()
-
getShardTransactionIdleTimeoutInMinutes
public NonZeroUint32Type getShardTransactionIdleTimeoutInMinutes()
-
getSyncIndexThreshold
public NonZeroUint32Type getSyncIndexThreshold()
-
getTransactionCreationInitialRateLimit
public NonZeroUint32Type getTransactionCreationInitialRateLimit()
-
isEnableMetricCapture
public Boolean isEnableMetricCapture()
-
isPersistent
public Boolean isPersistent()
-
isSnapshotOnRootOverwrite
public Boolean isSnapshotOnRootOverwrite()
-
isTransactionDebugContextEnabled
public Boolean isTransactionDebugContextEnabled()
-
isUseLz4Compression
public Boolean isUseLz4Compression()
-
isUseTellBasedProtocol
public Boolean isUseTellBasedProtocol()
-
augmentation
public <E$$ extends Augmentation<DataStorePropertiesContainer>> E$$ augmentation(Class<E$$> augmentationType)
-
setBackendAlivenessTimerIntervalInSeconds
public DataStorePropertiesContainerBuilder setBackendAlivenessTimerIntervalInSeconds(NonZeroUint32Type value)
-
setBoundedMailboxCapacity
public DataStorePropertiesContainerBuilder setBoundedMailboxCapacity(NonZeroUint32Type value)
-
setCustomRaftPolicyImplementation
public DataStorePropertiesContainerBuilder setCustomRaftPolicyImplementation(String value)
-
setFileBackedStreamingThresholdInMegabytes
public DataStorePropertiesContainerBuilder setFileBackedStreamingThresholdInMegabytes(NonZeroUint32Type value)
-
setFrontendNoProgressTimeoutInSeconds
public DataStorePropertiesContainerBuilder setFrontendNoProgressTimeoutInSeconds(NonZeroUint32Type value)
-
setFrontendRequestTimeoutInSeconds
public DataStorePropertiesContainerBuilder setFrontendRequestTimeoutInSeconds(NonZeroUint32Type value)
-
setInitialPayloadSerializedBufferCapacity
public DataStorePropertiesContainerBuilder setInitialPayloadSerializedBufferCapacity(NonZeroUint32Type value)
-
setInitialSettleTimeoutMultiplier
public DataStorePropertiesContainerBuilder setInitialSettleTimeoutMultiplier(Uint32 value)
-
setInitialSettleTimeoutMultiplier
@Deprecated(forRemoval=true) public DataStorePropertiesContainerBuilder setInitialSettleTimeoutMultiplier(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setInitialSettleTimeoutMultiplier(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setMaxShardDataChangeExecutorPoolSize
public DataStorePropertiesContainerBuilder setMaxShardDataChangeExecutorPoolSize(NonZeroUint32Type value)
-
setMaxShardDataChangeExecutorQueueSize
public DataStorePropertiesContainerBuilder setMaxShardDataChangeExecutorQueueSize(NonZeroUint32Type value)
-
setMaxShardDataChangeListenerQueueSize
public DataStorePropertiesContainerBuilder setMaxShardDataChangeListenerQueueSize(NonZeroUint32Type value)
-
setMaxShardDataStoreExecutorQueueSize
public DataStorePropertiesContainerBuilder setMaxShardDataStoreExecutorQueueSize(NonZeroUint32Type value)
-
setMaximumMessageSliceSize
public DataStorePropertiesContainerBuilder setMaximumMessageSliceSize(NonZeroUint32Type value)
-
setOperationTimeoutInSeconds
public DataStorePropertiesContainerBuilder setOperationTimeoutInSeconds(OperationTimeoutType value)
-
setRecoverySnapshotIntervalSeconds
public DataStorePropertiesContainerBuilder setRecoverySnapshotIntervalSeconds(Uint32 value)
-
setRecoverySnapshotIntervalSeconds
@Deprecated(forRemoval=true) public DataStorePropertiesContainerBuilder setRecoverySnapshotIntervalSeconds(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setRecoverySnapshotIntervalSeconds(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setShardBatchedModificationCount
public DataStorePropertiesContainerBuilder setShardBatchedModificationCount(NonZeroUint32Type value)
-
setShardCommitQueueExpiryTimeoutInSeconds
public DataStorePropertiesContainerBuilder setShardCommitQueueExpiryTimeoutInSeconds(NonZeroUint32Type value)
-
setShardElectionTimeoutFactor
public DataStorePropertiesContainerBuilder setShardElectionTimeoutFactor(NonZeroUint32Type value)
-
setShardHeartbeatIntervalInMillis
public DataStorePropertiesContainerBuilder setShardHeartbeatIntervalInMillis(HeartbeatIntervalType value)
-
setShardInitializationTimeoutInSeconds
public DataStorePropertiesContainerBuilder setShardInitializationTimeoutInSeconds(NonZeroUint32Type value)
-
setShardIsolatedLeaderCheckIntervalInMillis
public DataStorePropertiesContainerBuilder setShardIsolatedLeaderCheckIntervalInMillis(HeartbeatIntervalType value)
-
setShardJournalRecoveryLogBatchSize
public DataStorePropertiesContainerBuilder setShardJournalRecoveryLogBatchSize(NonZeroUint32Type value)
-
setShardLeaderElectionTimeoutInSeconds
public DataStorePropertiesContainerBuilder setShardLeaderElectionTimeoutInSeconds(NonZeroUint32Type value)
-
setShardSnapshotBatchCount
public DataStorePropertiesContainerBuilder setShardSnapshotBatchCount(NonZeroUint32Type value)
-
setShardSnapshotChunkSize
public DataStorePropertiesContainerBuilder setShardSnapshotChunkSize(NonZeroUint32Type value)
-
setShardSnapshotDataThreshold
public DataStorePropertiesContainerBuilder setShardSnapshotDataThreshold(Uint32 value)
-
setShardSnapshotDataThreshold
@Deprecated(forRemoval=true) public DataStorePropertiesContainerBuilder setShardSnapshotDataThreshold(Long value)
Deprecated, for removal: This API element is subject to removal in a future version.Use {#link setShardSnapshotDataThreshold(Uint32)} instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setShardSnapshotDataThresholdPercentage
public DataStorePropertiesContainerBuilder setShardSnapshotDataThresholdPercentage(Percentage value)
-
setShardTransactionCommitQueueCapacity
public DataStorePropertiesContainerBuilder setShardTransactionCommitQueueCapacity(NonZeroUint32Type value)
-
setShardTransactionCommitTimeoutInSeconds
public DataStorePropertiesContainerBuilder setShardTransactionCommitTimeoutInSeconds(NonZeroUint32Type value)
-
setShardTransactionIdleTimeoutInMinutes
public DataStorePropertiesContainerBuilder setShardTransactionIdleTimeoutInMinutes(NonZeroUint32Type value)
-
setSyncIndexThreshold
public DataStorePropertiesContainerBuilder setSyncIndexThreshold(NonZeroUint32Type value)
-
setTransactionCreationInitialRateLimit
public DataStorePropertiesContainerBuilder setTransactionCreationInitialRateLimit(NonZeroUint32Type value)
-
setEnableMetricCapture
public DataStorePropertiesContainerBuilder setEnableMetricCapture(Boolean value)
-
setPersistent
public DataStorePropertiesContainerBuilder setPersistent(Boolean value)
-
setSnapshotOnRootOverwrite
public DataStorePropertiesContainerBuilder setSnapshotOnRootOverwrite(Boolean value)
-
setTransactionDebugContextEnabled
public DataStorePropertiesContainerBuilder setTransactionDebugContextEnabled(Boolean value)
-
setUseLz4Compression
public DataStorePropertiesContainerBuilder setUseLz4Compression(Boolean value)
-
setUseTellBasedProtocol
public DataStorePropertiesContainerBuilder setUseTellBasedProtocol(Boolean value)
-
addAugmentation
public DataStorePropertiesContainerBuilder addAugmentation(Augmentation<DataStorePropertiesContainer> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException
- ifaugmentation
is null
-
addAugmentation
@Deprecated(forRemoval=true) public DataStorePropertiesContainerBuilder addAugmentation(Class<? extends Augmentation<DataStorePropertiesContainer>> augmentationType, Augmentation<DataStorePropertiesContainer> augmentationValue)
Deprecated, for removal: This API element is subject to removal in a future version.Use eitheraddAugmentation(Augmentation)
orremoveAugmentation(Class)
instead.Add or remove an augmentation to this builder's product.- Parameters:
augmentationType
- augmentation type to be added or removedaugmentationValue
- augmentation value, null if the augmentation type should be removed- Returns:
- this builder
-
removeAugmentation
public DataStorePropertiesContainerBuilder removeAugmentation(Class<? extends Augmentation<DataStorePropertiesContainer>> augmentationType)
Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.- Parameters:
augmentationType
- augmentation type to be removed- Returns:
- this builder
-
build
public DataStorePropertiesContainer build()
- Specified by:
build
in interfaceBuilder<DataStorePropertiesContainer>
- Specified by:
build
in interfaceCheckedBuilder<DataStorePropertiesContainer,IllegalArgumentException>
-
-