Interface AimdLimitConfig
- All Superinterfaces:
Prototype.Api
,Prototype.Factory<AimdLimit>
- All Known Implementing Classes:
AimdLimitConfig.BuilderBase.AimdLimitConfigImpl
Configuration of
AimdLimit
.- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forAimdLimit
.static class
AimdLimitConfig.BuilderBase<BUILDER extends AimdLimitConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends AimdLimitConfig> Fluent API builder base forAimdLimit
. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Backoff ratio to use for the algorithm.static AimdLimitConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static AimdLimitConfig.Builder
builder
(AimdLimitConfig instance) Create a new fluent API builder from an existing instance.clock()
A clock that supplies nanosecond time.static AimdLimitConfig
create()
Create a new instance with default values.static AimdLimitConfig
Create a new instance from configuration.int
Initial limit.int
maxLimit()
Maximal limit.int
minLimit()
Minimal limit.name()
Name of this instance.timeout()
Timeout that when exceeded is the same as if the task failed.Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
backoffRatio
double backoffRatio()Backoff ratio to use for the algorithm. The value must be within [0.5, 1.0).- Returns:
- backoff ratio
-
initialLimit
int initialLimit()Initial limit. The value must be within [minLimit()
,maxLimit()
].- Returns:
- initial limit
-
maxLimit
int maxLimit()Maximal limit. The value must be same or higher thanminLimit()
.- Returns:
- maximal limit
-
minLimit
int minLimit()Minimal limit. The value must be same or lower thanmaxLimit()
.- Returns:
- minimal limit
-
timeout
Duration timeout()Timeout that when exceeded is the same as if the task failed.- Returns:
- task timeout, defaults to 5 seconds
-
clock
A clock that supplies nanosecond time.- Returns:
- supplier of current nanoseconds, defaults to
System.nanoTime()
-
name
String name()Name of this instance.- Returns:
- name of the instance
-