Set the number of internal retries.

@param nRetries
Retries to use. Must be &ge; 0.
@return this for chaining
@since 9.0.0
19558
@Nonnull
  public final HttpClientFactory setRetries (@Nonnegative final int nRetries)
  {
    ValueEnforcer.isGE0 (nRetries, "Retries");
    m_nRetries = nRetries;
    return this;
  }
851669
public CurrencyQueryBuilder setNumericCodes(int... codes) {
        return set(CurrencyQuery.KEY_QUERY_NUMERIC_CODES,
                Arrays.stream(codes).boxed().collect(Collectors.toList()));
    }
1100937
@Nonnull
  public static SimpleScheduleBuilder repeatSecondlyForTotalCount (final int nCount, final int nSeconds)
  {
    ValueEnforcer.isGT0 (nCount, "Count");
    return simpleSchedule ().withIntervalInSeconds (nSeconds).withRepeatCount (nCount - 1);
  }
453456
public HTTPRequest retry(final int maxRetries, final Retryable retryable, final WaitStrategy waitStrategy) {
        if (maxRetries <= 0) {
            throw new IllegalArgumentException("maxRetries must be > 0");
        }
        if (retryable == null) {
            throw new IllegalArgumentException("retryable must not be null");
        }
        if (waitStrategy == null) {
            throw new IllegalArgumentException("waitStrategy must not be null");
        }
        this.maxRetries = maxRetries;
        this.retryable = retryable;
        this.waitStrategy = waitStrategy;
        return this;
    }
525528
protected function setInitialResetters()
    {
        $app = $this->getBaseApp();

        $resetters = [
            ClearInstances::class,
            RebindHttpContainer::class,
            RebindRouterContainer::class,
            BindRequest::class,
            ResetConfig::class,
            ResetEvent::class,
        ];

        $resetters = array_merge($resetters, $this->config->get('swoole.resetters', []));

        foreach ($resetters as $resetter) {
            $resetterClass = $app->make($resetter);
            if (!$resetterClass instanceof ResetterContract) {
                throw new RuntimeException("{$resetter} must implement " . ResetterContract::class);
            }
            $this->resetters[$resetter] = $resetterClass;
        }
    }
1147703
public void setMaxRetriesOnIOError(int retries) {
        if (retries < 0) {
            throw new IllegalArgumentException("Parameter retries must be greater or equal to zero.");
        }

        HttpMethodRetryHandler retryHandler = new DefaultHttpMethodRetryHandler(retries, false);
        client.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, retryHandler);
        clientViaProxy.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, retryHandler);
    }
389219
public void setFailedEvaluations(java.util.Collection<Evaluation> failedEvaluations) {
        if (failedEvaluations == null) {
            this.failedEvaluations = null;
            return;
        }

        this.failedEvaluations = new com.amazonaws.internal.SdkInternalList<Evaluation>(failedEvaluations);
    }
1085697
public RetrySimulation executeSimulation(int numSimulations) {
		RetrySimulation simulation = new RetrySimulation();

		for (int i = 0; i < numSimulations; i++) {
			simulation.addSequence(executeSingleSimulation());
		}
		return simulation;
	}
2267
public static <T> T retry(final Callable<T> f, Predicate<Throwable> shouldRetry, final int maxTries) throws Exception
  {
    return retry(f, shouldRetry, 0, maxTries);
  }
543793
public ProviderContextBuilder setRateTypes(Collection<RateType> rateTypes) {
        Objects.requireNonNull(rateTypes);
        if (rateTypes.isEmpty()) {
            throw new IllegalArgumentException("At least one RateType is required.");
        }
        Set<RateType> rtSet = new HashSet<>(rateTypes);
        set(ProviderContext.KEY_RATE_TYPES, rtSet);
        return this;
    }
989926
final protected void common_releaseLruEntries(int numOfEntries) {
        if (numOfEntries > 0) {
            int entriesRemoved = 0;
            for (int i = 0; i < numOfEntries; i++) {
                // free up one entry
                FreeLruEntryResult result = cache.freeLruEntry();
                if (result.success == false) {
                    break;
                }
                entriesRemoved++;
            }
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "releaseLruEntries(): cacheName=" + this.cacheName +
                             " entriesToRemove=" + numOfEntries +
                             " entriesRemoved=" + entriesRemoved);
            }
        }
    }
817505
def retry_count(self, retries):
        
        if not isinstance(retries, int):
            raise TypeError("retries must be an integer")

        old_retries, self.retries = self.retries, retries
        try:
            yield
        finally:
            self.retries = old_retries
1253688
public int setRecursionLimit(final int limit) {
    if (limit < 0) {
      throw new IllegalArgumentException(
        "Recursion limit cannot be negative: " + limit);
    }
    final int oldLimit = recursionLimit;
    recursionLimit = limit;
    return oldLimit;
  }
448802
public void setPolicies(RetryPolicy[] policies) {
		this.policies = Arrays.asList(policies).toArray(new RetryPolicy[policies.length]);
	}
1303847
@Nonnull
  public static SimpleScheduleBuilder repeatHourlyForTotalCount (final int nCount, final int nHours)
  {
    ValueEnforcer.isGT0 (nCount, "Count");
    return simpleSchedule ().withIntervalInHours (nHours).withRepeatCount (nCount - 1);
  }
1220349
public HashConfigurationBuilder numOwners(int numOwners) {
      if (numOwners < 1) throw new IllegalArgumentException("numOwners cannot be less than 1");
      attributes.attribute(NUM_OWNERS).set(numOwners);
      return this;
   }
709046
@SuppressWarnings("unchecked")
  public RetryPolicy<R> abortOn(Class<? extends Throwable>... failures) {
    Assert.notNull(failures, "failures");
    Assert.isTrue(failures.length > 0, "Failures cannot be empty");
    return abortOn(Arrays.asList(failures));
  }