Package io.kubernetes.client.util
Class RetryUtils
java.lang.Object
io.kubernetes.client.util.RetryUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <ApiType> ApiType
retryUponConflict
(ApiInvocation<ApiType> apiTypeApiInvocation, int maxRetry) Invokes kubernetes api and will retry upon CONFLICT(409) response.
-
Constructor Details
-
RetryUtils
public RetryUtils()
-
-
Method Details
-
retryUponConflict
public static <ApiType> ApiType retryUponConflict(ApiInvocation<ApiType> apiTypeApiInvocation, int maxRetry) throws io.kubernetes.client.openapi.ApiException Invokes kubernetes api and will retry upon CONFLICT(409) response.Note that this helper method is mostly intended for update calls where CONFLICT can be returned when updating resources with a stale resource version.
- Type Parameters:
ApiType
- the type parameter- Parameters:
apiTypeApiInvocation
- the api type api invocation lambdamaxRetry
- the max retry count- Returns:
- the returned api type
- Throws:
io.kubernetes.client.openapi.ApiException
- the api exception
-