|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.impl.client.cache.DefaultFailureCache
@Contract(threading=SAFE) public class DefaultFailureCache
Implements a bounded failure cache. The oldest entries are discarded when the maximum size is exceeded.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
int |
getErrorCount(String identifier)
Get the current error count. |
void |
increaseErrorCount(String identifier)
Increases the error count by one. |
void |
resetErrorCount(String identifier)
Reset the error count back to zero. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultFailureCache()
DEFAULT_MAX_SIZE
.
public DefaultFailureCache(int maxSize)
maxSize
- the maximum number of entries the cache should storeMethod Detail |
---|
public int getErrorCount(String identifier)
FailureCache
getErrorCount
in interface FailureCache
identifier
- the identifier for which the error count is requested
public void resetErrorCount(String identifier)
FailureCache
resetErrorCount
in interface FailureCache
identifier
- the identifier for which the error count should be
resetpublic void increaseErrorCount(String identifier)
FailureCache
increaseErrorCount
in interface FailureCache
identifier
- the identifier for which the error count should be
increased
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |