Class AimdLimitConfig.Builder
java.lang.Object
io.helidon.common.concurrency.limits.AimdLimitConfig.BuilderBase<AimdLimitConfig.Builder, AimdLimitConfig>
io.helidon.common.concurrency.limits.AimdLimitConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<AimdLimitConfig.Builder, AimdLimitConfig>, Builder<AimdLimitConfig.Builder, AimdLimit>, ConfigBuilderSupport.ConfiguredBuilder<AimdLimitConfig.Builder, AimdLimitConfig>, Supplier<AimdLimit>
- Enclosing interface:
AimdLimitConfig
public static class AimdLimitConfig.Builder
extends AimdLimitConfig.BuilderBase<AimdLimitConfig.Builder, AimdLimitConfig>
implements Builder<AimdLimitConfig.Builder, AimdLimit>
Fluent API builder for
AimdLimit.-
Nested Class Summary
Nested classes/interfaces inherited from class AimdLimitConfig.BuilderBase
AimdLimitConfig.BuilderBase.AimdLimitConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class AimdLimitConfig.BuilderBase
backoffRatio, backoffRatio, clearClock, clock, clock, config, config, enableMetrics, enableMetrics, fair, fair, from, from, initialLimit, initialLimit, maxLimit, maxLimit, minLimit, minLimit, name, name, preBuildPrototype, queueLength, queueLength, queueTimeout, queueTimeout, timeout, timeout, toString, validatePrototypeModifier and TypeMethodDescriptiondoubleBackoff ratio to use for the algorithm.backoffRatio(double backoffRatio) Backoff ratio to use for the algorithm.Clear existing value of clock.clock()A clock that supplies nanosecond time.A clock that supplies nanosecond time.config()Configuration used to configure this instance.Update builder from configuration (node of this type).booleanWhether to collect metrics for the AIMD implementation.enableMetrics(boolean enableMetrics) Whether to collect metrics for the AIMD implementation.booleanfair()Whether theSemaphoreshould beSemaphore.isFair().fair(boolean fair) Whether theSemaphoreshould beSemaphore.isFair().from(AimdLimitConfig prototype) Update this builder from an existing prototype instance.from(AimdLimitConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.intInitial limit.initialLimit(int initialLimit) Initial limit.intmaxLimit()Maximal limit.maxLimit(int maxLimit) Maximal limit.intminLimit()Minimal limit.minLimit(int minLimit) Minimal limit.name()Name of this instance.Name of this instance.protected voidHandles providers and decorators.intHow many requests can be enqueued waiting for a permit after the max limit is reached.queueLength(int queueLength) How many requests can be enqueued waiting for a permit after the max limit is reached.How long to wait for a permit when enqueued.queueTimeout(Duration queueTimeout) How long to wait for a permit when enqueued.timeout()Timeout that when exceeded is the same as if the task failed.Timeout that when exceeded is the same as if the task failed.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault AimdLimitget()default AimdLimitConfig.Builderidentity()Instance of this builder as the correct type.default AimdLimitConfig.Builderupdate(Consumer<AimdLimitConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault AimdLimitConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<AimdLimitConfig.Builder, AimdLimitConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<AimdLimitConfig.Builder, AimdLimit>- Returns:
- instance of the built type
-