Class HedgingSettings (1.157.0)

public final class HedgingSettings

Settings for configuring publish hedging.

Inheritance

java.lang.Object > HedgingSettings

Static Methods

newBuilder()

public static HedgingSettings.Builder newBuilder()

Returns a new builder for HedgingSettings.

Returns
Type Description
HedgingSettings.Builder

a new builder.

Methods

getHedgeDelay()

public Duration getHedgeDelay()

Returns the configured hedging delay.

Returns
Type Description
Duration

the hedging delay.

getMaxTokens()

public int getMaxTokens()

Returns the maximum number of tokens in the token bucket rate limiter.

Returns
Type Description
int

the max tokens.

getRefillRatio()

public float getRefillRatio()

Returns the token bucket refill ratio per successful request.

Returns
Type Description
float

the refill ratio.