Class RetryUtils

java.lang.Object
io.kubernetes.client.util.RetryUtils

public class RetryUtils extends Object
  • 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 lambda
      maxRetry - the max retry count
      Returns:
      the returned api type
      Throws:
      io.kubernetes.client.openapi.ApiException - the api exception