public static class RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V> extends RetryingCacheLoaderDecorator<K,V>
RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V>, RetryingCacheLoaderDecorator.OnThrowableBuilder<K,V>
Modifier | Constructor and Description |
---|---|
protected |
RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator(Class<? extends Throwable> retryableThrowable) |
Modifier and Type | Method and Description |
---|---|
<K1 extends K,V1 extends V> |
decorate(com.google.common.cache.CacheLoader<K1,V1> loader)
Decorates a cacheloader, or returns the same value, if no retrying features were requested.
|
RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V> |
maxPeriodMs(long maxPeriodMs)
The initial period in milliseconds to delay between tries.
|
RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V> |
maxTries(int maxTries)
The maximum attempts to try on the given exception type
default:
5 |
RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V> |
periodMs(long periodMs)
The initial period in milliseconds to delay between tries.
|
protected com.google.common.base.Objects.ToStringHelper |
string()
append any state that should be considered in
RetryingCacheLoaderDecorator.toString() here. |
newDecorator, on, toString
public RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V> periodMs(long periodMs)
100
public RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V> maxPeriodMs(long maxPeriodMs)
200
public RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V> maxTries(int maxTries)
5
public <K1 extends K,V1 extends V> com.google.common.cache.CacheLoader<K1,V1> decorate(com.google.common.cache.CacheLoader<K1,V1> loader)
RetryingCacheLoaderDecorator
This method does not alter the state of this RetryingCacheLoaderDecorator
instance, so
it can be invoked again to create multiple independent cache loaders.
decorate
in class RetryingCacheLoaderDecorator<K,V>
loader
- the cache loader used to obtain new valuesprotected com.google.common.base.Objects.ToStringHelper string()
RetryingCacheLoaderDecorator
RetryingCacheLoaderDecorator.toString()
here.string
in class RetryingCacheLoaderDecorator<K,V>
Copyright © 2009-2013 jclouds. All Rights Reserved.