Package com.influxdb.client
Interface WriteApi.RetryOptions
- All Known Implementing Classes:
WriteOptions
- Enclosing interface:
WriteApi
public static interface WriteApi.RetryOptions
Retry configuration.
-
Method Summary
Modifier and TypeMethodDescriptionintThe base for the exponential retry delay.intJitters the batch flush interval by a random amount.intThe number of max retries when write fails.intThe maximum delay between each retry attempt in milliseconds.intThe retry interval is used when the InfluxDB server does not specify "Retry-After" header.
-
Method Details
-
getJitterInterval
int getJitterInterval()Jitters the batch flush interval by a random amount. This is primarily to avoid large write spikes for users running a large number of client instances. ie, a jitter of 5s and flush duration 10s means flushes will happen every 10-15s.- Returns:
- milliseconds
-
getRetryInterval
int getRetryInterval()The retry interval is used when the InfluxDB server does not specify "Retry-After" header.
Retry-After: A non-negative decimal integer indicating the seconds to delay after the response is received.- Returns:
- the time to wait before retry unsuccessful write (milliseconds)
-
getMaxRetries
int getMaxRetries()The number of max retries when write fails.- Returns:
- number of max retries
-
getMaxRetryDelay
int getMaxRetryDelay()The maximum delay between each retry attempt in milliseconds.- Returns:
- maximum delay
-
getExponentialBase
int getExponentialBase()The base for the exponential retry delay.The next delay is computed as: retryInterval * exponentialBase^(attempts-1) + random(jitterInterval)
- Returns:
- exponential base
-