Class AimdLimitConfig.BuilderBase<BUILDER extends AimdLimitConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AimdLimitConfig>
java.lang.Object
io.helidon.common.concurrency.limits.AimdLimitConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
AimdLimitConfig.Builder
- Enclosing interface:
AimdLimitConfig
public abstract static class AimdLimitConfig.BuilderBase<BUILDER extends AimdLimitConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AimdLimitConfig>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
AimdLimit
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Backoff ratio to use for the algorithm.backoffRatio
(double backoffRatio) Backoff ratio to use for the algorithm.Clear existing value of this property.clock()
A clock that supplies nanosecond time.A clock that supplies nanosecond time.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).from
(AimdLimitConfig prototype) Update this builder from an existing prototype instance.from
(AimdLimitConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.int
Initial limit.initialLimit
(int initialLimit) Initial limit.int
maxLimit()
Maximal limit.maxLimit
(int maxLimit) Maximal limit.int
minLimit()
Minimal limit.minLimit
(int minLimit) Minimal limit.name()
Name of this instance.Name of this instance.protected void
Handles providers and decorators.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 void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends AimdLimitConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends AimdLimitConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
backoffRatio
Backoff ratio to use for the algorithm. The value must be within [0.5, 1.0).- Parameters:
backoffRatio
- backoff ratio- Returns:
- updated builder instance
- See Also:
-
initialLimit
Initial limit. The value must be within [minLimit()
,maxLimit()
].- Parameters:
initialLimit
- initial limit- Returns:
- updated builder instance
- See Also:
-
maxLimit
Maximal limit. The value must be same or higher thanminLimit()
.- Parameters:
maxLimit
- maximal limit- Returns:
- updated builder instance
- See Also:
-
minLimit
Minimal limit. The value must be same or lower thanmaxLimit()
.- Parameters:
minLimit
- minimal limit- Returns:
- updated builder instance
- See Also:
-
timeout
Timeout that when exceeded is the same as if the task failed.- Parameters:
timeout
- task timeout, defaults to 5 seconds- Returns:
- updated builder instance
- See Also:
-
clearClock
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
clock
A clock that supplies nanosecond time.- Parameters:
clock
- supplier of current nanoseconds, defaults toSystem.nanoTime()
- Returns:
- updated builder instance
- See Also:
-
name
Name of this instance.- Parameters:
name
- name of the instance- Returns:
- updated builder instance
- See Also:
-
backoffRatio
public double backoffRatio()Backoff ratio to use for the algorithm. The value must be within [0.5, 1.0).- Returns:
- the backoff ratio
-
initialLimit
public int initialLimit()Initial limit. The value must be within [minLimit()
,maxLimit()
].- Returns:
- the initial limit
-
maxLimit
public int maxLimit()Maximal limit. The value must be same or higher thanminLimit()
.- Returns:
- the max limit
-
minLimit
public int minLimit()Minimal limit. The value must be same or lower thanmaxLimit()
.- Returns:
- the min limit
-
timeout
Timeout that when exceeded is the same as if the task failed.- Returns:
- the timeout
-
clock
A clock that supplies nanosecond time.- Returns:
- the clock
-
name
Name of this instance.- Returns:
- the name
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-