mat_boy
mat_boy

Reputation: 13666

DefaultServiceUnavailableRetryStrategy constructor from Apache Httpclient

The class DefaultServiceUnavailableRetryStrategy from Apache Httpclient v.4 has a constructor that accepts two parameters. The first, int maxRetries, is clear; the second int retryInterval has a clear scope, but I don't undestand if it must represent minutes, seconds or something else. The doc doesn't specify this particular.

Any idea?

Upvotes: 3

Views: 766

Answers (1)

JeanValjean
JeanValjean

Reputation: 17713

You are right, sometimes the docs are not well documented. Anyway, I have the source code here. I just copy and paste the field declaration inside the DefaultServiceUnavailableRetryStrategy class:

/**
 * Retry interval between subsequent requests, in milliseconds. Default
 * value is 1 second.
 */
private final long retryInterval;

as you may see it is milliseconds, while default value is 1000 (i.e. 1 second).

Also I believe that milliseconds is a standard for times! But I'm not pretty sure about this!

Upvotes: 3

Related Questions