> @@ -51,9 +56,17 @@ protected RetryOnRenew(LoadingCache<Credentials, Access> 
> authenticationResponseC
>        this.authenticationResponseCache = authenticationResponseCache;
>     }
>  
> +   /*
> +    * The reason retries need to be tracked is that it is possible that a 
> token can be expired at any time.
> +    * The reason we track by request is that only some requests might return 
> a 401 (such as temporary URLs).
> +    * However consistent failures of the magnitude this code tracks should 
> indicate a problem.
> +    */
> +   private static Cache<HttpCommand, Integer> retryCountMap = 
> CacheBuilder.newBuilder()
> +                                                                       
> .expireAfterWrite(5, TimeUnit.MINUTES)

Why 5min? Could/should this be configurable? And make the object final?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/104/files#r5645244

Reply via email to