public static final class HedgingSettings.BuilderBuilder for HedgingSettings.
Methods
build()
public HedgingSettings build()Builds an instance of HedgingSettings.
| Returns | |
|---|---|
| Type | Description |
HedgingSettings |
the built |
setHedgeDelay(Duration delay)
public HedgingSettings.Builder setHedgeDelay(Duration delay)Allows hedging delay to be configurable.
| Parameter | |
|---|---|
| Name | Description |
delay |
Durationthe hedging delay, must be 0.1s <= HedgeDelay <= 10s. |
| Returns | |
|---|---|
| Type | Description |
HedgingSettings.Builder |
this builder. |
setMaxTokens(int maxTokens)
public HedgingSettings.Builder setMaxTokens(int maxTokens)Allows the maximum number of tokens in the bucket to be configurable.
| Parameter | |
|---|---|
| Name | Description |
maxTokens |
intthe maximum number of tokens, must be 0 < MaxTokens <= 250. |
| Returns | |
|---|---|
| Type | Description |
HedgingSettings.Builder |
this builder. |
setRefillRatio(float refillRatio)
public HedgingSettings.Builder setRefillRatio(float refillRatio)Allows the token bucket refill rate to be configurable.
| Parameter | |
|---|---|
| Name | Description |
refillRatio |
floatthe refill rate (tokens per successful request), must be 0.001 <= RefillRatio <= 0.2. |
| Returns | |
|---|---|
| Type | Description |
HedgingSettings.Builder |
this builder. |