|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jclouds.cache.RetryingCacheLoaderDecorator<K,V>
K - the base key type for all cache loaders created by this decoratorV - the base value type for all cache loaders created by this decorator@Beta public class RetryingCacheLoaderDecorator<K,V>
A decorator of CacheLoader instances having any combination of the following features:
Usage example:
| Nested Class Summary | |
|---|---|
static class |
RetryingCacheLoaderDecorator.BackoffExponentiallyAndRetryOnThrowableCacheLoaderDecorator<K,V>
|
static class |
RetryingCacheLoaderDecorator.OnThrowableBuilder<K,V>
|
| Constructor Summary | |
|---|---|
protected |
RetryingCacheLoaderDecorator()
|
| Method Summary | ||
|---|---|---|
|
decorate(com.google.common.cache.CacheLoader<K1,V1> loader)
Decorates a cacheloader, or returns the same value, if no retrying features were requested. |
|
static RetryingCacheLoaderDecorator<Object,Object> |
newDecorator()
Constructs a new RetryingCacheLoaderDecorator instance with default settings, and no
retrying any kind. |
|
RetryingCacheLoaderDecorator.OnThrowableBuilder<K,V> |
on(Class<? extends Throwable> retryableThrowable)
Determines the action to carry out on a particular throwable. |
|
protected com.google.common.base.Objects.ToStringHelper |
string()
append any state that should be considered in toString() here. |
|
String |
toString()
Returns a string representation for this RetryingCacheLoaderDecorator instance. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected RetryingCacheLoaderDecorator()
| Method Detail |
|---|
public static RetryingCacheLoaderDecorator<Object,Object> newDecorator()
RetryingCacheLoaderDecorator instance with default settings, and no
retrying any kind.
public RetryingCacheLoaderDecorator.OnThrowableBuilder<K,V> on(Class<? extends Throwable> retryableThrowable)
public <K1 extends K,V1 extends V> com.google.common.cache.CacheLoader<K1,V1> decorate(com.google.common.cache.CacheLoader<K1,V1> loader)
This method does not alter the state of this RetryingCacheLoaderDecorator instance, so
it can be invoked again to create multiple independent cache loaders.
loader - the cache loader used to obtain new values
public String toString()
toString in class Objectprotected com.google.common.base.Objects.ToStringHelper string()
toString() here.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||