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:
org.opendaylight.yangtools.concepts.Builder<DataStorePropertiesContainer>,org.opendaylight.yangtools.concepts.CheckedBuilder<DataStorePropertiesContainer,IllegalArgumentException>,org.opendaylight.yangtools.concepts.Mutable,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class DataStorePropertiesContainerBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<DataStorePropertiesContainer>
Class that buildsDataStorePropertiesContainerinstances. 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:
DataStorePropertiesContainer createDataStorePropertiesContainer(int fooXyzzy, int barBaz) { return new DataStorePropertiesContainerBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }This pattern is supported by the immutable nature of DataStorePropertiesContainer, 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 opportunities, 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:
DataStorePropertiesContainer,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(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument. Valid argument is instance of one of following types:- DataStoreProperties
- Parameters:
arg- grouping object- Throws:
IllegalArgumentException- if given argument is none of valid types or has property with incompatible value
-
getBackendAlivenessTimerIntervalInSeconds
public NonZeroUint32Type getBackendAlivenessTimerIntervalInSeconds()
-
getBoundedMailboxCapacity
public NonZeroUint32Type getBoundedMailboxCapacity()
-
getCustomRaftPolicyImplementation
public String getCustomRaftPolicyImplementation()
-
getEnableMetricCapture
public Boolean getEnableMetricCapture()
-
getExportOnRecovery
public DataStoreProperties.ExportOnRecovery getExportOnRecovery()
-
getFileBackedStreamingThresholdInMegabytes
public NonZeroUint32Type getFileBackedStreamingThresholdInMegabytes()
-
getFrontendNoProgressTimeoutInSeconds
public NonZeroUint32Type getFrontendNoProgressTimeoutInSeconds()
-
getFrontendRequestTimeoutInSeconds
public NonZeroUint32Type getFrontendRequestTimeoutInSeconds()
-
getInitialPayloadSerializedBufferCapacity
public NonZeroUint32Type getInitialPayloadSerializedBufferCapacity()
-
getInitialSettleTimeoutMultiplier
public org.opendaylight.yangtools.yang.common.Uint32 getInitialSettleTimeoutMultiplier()
-
getMaximumMessageSliceSize
public NonZeroUint32Type getMaximumMessageSliceSize()
-
getOperationTimeoutInSeconds
public OperationTimeoutType getOperationTimeoutInSeconds()
-
getPersistent
public Boolean getPersistent()
-
getRecoveryExportBaseDir
public String getRecoveryExportBaseDir()
-
getRecoverySnapshotIntervalSeconds
public org.opendaylight.yangtools.yang.common.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 org.opendaylight.yangtools.yang.common.Uint32 getShardSnapshotDataThreshold()
-
getShardSnapshotDataThresholdPercentage
public Percentage getShardSnapshotDataThresholdPercentage()
-
getShardTransactionCommitQueueCapacity
public NonZeroUint32Type getShardTransactionCommitQueueCapacity()
-
getShardTransactionCommitTimeoutInSeconds
public NonZeroUint32Type getShardTransactionCommitTimeoutInSeconds()
-
getShardTransactionIdleTimeoutInMinutes
public NonZeroUint32Type getShardTransactionIdleTimeoutInMinutes()
-
getSnapshotOnRootOverwrite
public Boolean getSnapshotOnRootOverwrite()
-
getSyncIndexThreshold
public NonZeroUint32Type getSyncIndexThreshold()
-
getTransactionCreationInitialRateLimit
public NonZeroUint32Type getTransactionCreationInitialRateLimit()
-
getTransactionDebugContextEnabled
public Boolean getTransactionDebugContextEnabled()
-
getUseLz4Compression
public Boolean getUseLz4Compression()
-
getUseTellBasedProtocol
public Boolean getUseTellBasedProtocol()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.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)
-
setEnableMetricCapture
public DataStorePropertiesContainerBuilder setEnableMetricCapture(Boolean value)
-
setExportOnRecovery
public DataStorePropertiesContainerBuilder setExportOnRecovery(DataStoreProperties.ExportOnRecovery 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(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setMaximumMessageSliceSize
public DataStorePropertiesContainerBuilder setMaximumMessageSliceSize(NonZeroUint32Type value)
-
setOperationTimeoutInSeconds
public DataStorePropertiesContainerBuilder setOperationTimeoutInSeconds(OperationTimeoutType value)
-
setPersistent
public DataStorePropertiesContainerBuilder setPersistent(Boolean value)
-
setRecoveryExportBaseDir
public DataStorePropertiesContainerBuilder setRecoveryExportBaseDir(String value)
-
setRecoverySnapshotIntervalSeconds
public DataStorePropertiesContainerBuilder setRecoverySnapshotIntervalSeconds(org.opendaylight.yangtools.yang.common.Uint32 value)
-
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(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setShardSnapshotDataThresholdPercentage
public DataStorePropertiesContainerBuilder setShardSnapshotDataThresholdPercentage(Percentage value)
-
setShardTransactionCommitQueueCapacity
public DataStorePropertiesContainerBuilder setShardTransactionCommitQueueCapacity(NonZeroUint32Type value)
-
setShardTransactionCommitTimeoutInSeconds
public DataStorePropertiesContainerBuilder setShardTransactionCommitTimeoutInSeconds(NonZeroUint32Type value)
-
setShardTransactionIdleTimeoutInMinutes
public DataStorePropertiesContainerBuilder setShardTransactionIdleTimeoutInMinutes(NonZeroUint32Type value)
-
setSnapshotOnRootOverwrite
public DataStorePropertiesContainerBuilder setSnapshotOnRootOverwrite(Boolean value)
-
setSyncIndexThreshold
public DataStorePropertiesContainerBuilder setSyncIndexThreshold(NonZeroUint32Type value)
-
setTransactionCreationInitialRateLimit
public DataStorePropertiesContainerBuilder setTransactionCreationInitialRateLimit(NonZeroUint32Type value)
-
setTransactionDebugContextEnabled
public DataStorePropertiesContainerBuilder setTransactionDebugContextEnabled(Boolean value)
-
setUseLz4Compression
public DataStorePropertiesContainerBuilder setUseLz4Compression(Boolean value)
-
setUseTellBasedProtocol
public DataStorePropertiesContainerBuilder setUseTellBasedProtocol(Boolean value)
-
addAugmentation
public DataStorePropertiesContainerBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<DataStorePropertiesContainer> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException- ifaugmentationis null
-
removeAugmentation
public DataStorePropertiesContainerBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.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:
buildin interfaceorg.opendaylight.yangtools.concepts.Builder<DataStorePropertiesContainer>- Specified by:
buildin interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<DataStorePropertiesContainer,IllegalArgumentException>
-
-