Package io.milvus.param
Class RetryParam.Builder
java.lang.Object
io.milvus.param.RetryParam.Builder
- Enclosing class:
RetryParam
Builder for
ConnectParam-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Verifies parameters and creates a newRetryParaminstance.withBackOffMultiplier(int backOffMultiplier) Sets multiplier to increase time interval after each retry.withInitialBackOffMs(long initialBackOffMs) Sets the first time interval between two retries, units: millisecond.withMaxBackOffMs(long maxBackOffMs) Sets the maximum time interval between two retries, units: millisecond.withMaxRetryTimes(int maxRetryTimes) Sets the max retry times on failure.Default value is 75.withRetryOnRateLimit(boolean retryOnRateLimit) Sets whether to retry when the returned error is rate limit.Default value is true.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
withMaxRetryTimes
Sets the max retry times on failure.Default value is 75.- Parameters:
maxRetryTimes- the maxinum times to retry- Returns:
Builder
-
withInitialBackOffMs
Sets the first time interval between two retries, units: millisecond. Default value is 10ms.- Parameters:
initialBackOffMs- time interval value- Returns:
Builder
-
withMaxBackOffMs
Sets the maximum time interval between two retries, units: millisecond. Default value is 3000ms.- Parameters:
maxBackOffMs- time interval value- Returns:
Builder
-
withBackOffMultiplier
Sets multiplier to increase time interval after each retry. Default value is 3.- Parameters:
backOffMultiplier- the multiplier to increase time interval after each retry- Returns:
Builder
-
withRetryOnRateLimit
Sets whether to retry when the returned error is rate limit.Default value is true.- Parameters:
retryOnRateLimit- whether to retry when the returned error is rate limit- Returns:
Builder
-
build
Verifies parameters and creates a newRetryParaminstance.- Returns:
RetryParam- Throws:
ParamException
-