- Enclosing class:
HttpCache
public static interface HttpCache.Stats
Statistics of an
HttpCache.-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpCache.Statsempty()Returns aStatswith zero counters.longhitCount()Returns the number of requests resulting in a cache hit, including conditional hits.default doublehitRate()Returns a value between0.0and1.0representing the ratio between the hit and request counts.longReturns the number of requests resulting in a cache miss, including conditional misses (unsatisfied revalidation requests).default doublemissRate()Returns a value between0.0and1.0representing the ratio between the miss and request counts.longReturns the number of times the cache had to use the network.default longReturns the number of times a response wasn't read from cache due to a read failure.default longReturns the number of times a response was successfully read from cache.longReturns the number of requests intercepted by the cache.longReturns the number of times a response wasn't written to cache due to a write failure.longReturns the number of times a response was successfully written to cache.
-
Method Details
-
requestCount
long requestCount()Returns the number of requests intercepted by the cache. -
hitCount
long hitCount()Returns the number of requests resulting in a cache hit, including conditional hits. -
missCount
long missCount()Returns the number of requests resulting in a cache miss, including conditional misses (unsatisfied revalidation requests). -
networkUseCount
long networkUseCount()Returns the number of times the cache had to use the network. -
readSuccessCount
default long readSuccessCount()Returns the number of times a response was successfully read from cache. -
readFailureCount
default long readFailureCount()Returns the number of times a response wasn't read from cache due to a read failure. -
writeSuccessCount
long writeSuccessCount()Returns the number of times a response was successfully written to cache. -
writeFailureCount
long writeFailureCount()Returns the number of times a response wasn't written to cache due to a write failure. -
hitRate
default double hitRate()Returns a value between0.0and1.0representing the ratio between the hit and request counts. -
missRate
default double missRate()Returns a value between0.0and1.0representing the ratio between the miss and request counts. -
empty
Returns aStatswith zero counters.
-