@ThreadSafe public class DefaultFailureCache extends java.lang.Object implements FailureCache
| Constructor and Description |
|---|
DefaultFailureCache()
Create a new failure cache with the maximum size of
DEFAULT_MAX_SIZE. |
DefaultFailureCache(int maxSize)
Creates a new failure cache with the specified maximum size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCount(java.lang.String identifier)
Get the current error count.
|
void |
increaseErrorCount(java.lang.String identifier)
Increases the error count by one.
|
void |
resetErrorCount(java.lang.String identifier)
Reset the error count back to zero.
|
public DefaultFailureCache()
DEFAULT_MAX_SIZE.public DefaultFailureCache(int maxSize)
maxSize - the maximum number of entries the cache should storepublic int getErrorCount(java.lang.String identifier)
FailureCachegetErrorCount in interface FailureCacheidentifier - the identifier for which the error count is requestedpublic void resetErrorCount(java.lang.String identifier)
FailureCacheresetErrorCount in interface FailureCacheidentifier - the identifier for which the error count should be
resetpublic void increaseErrorCount(java.lang.String identifier)
FailureCacheincreaseErrorCount in interface FailureCacheidentifier - the identifier for which the error count should be
increased