- Enclosing class:
HttpCache
public static interface HttpCache.Stats
Statistics of an
HttpCache
.-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpCache.Stats
empty()
Returns aStats
with zero counters.long
hitCount()
Returns the number of requests resulting in a cache hit, including conditional hits.default double
hitRate()
Returns a value between0.0
and1.0
representing the ratio between the hit and request counts.long
Returns the number of requests resulting in a cache miss, including conditional misses (unsatisfied revalidation requests).default double
missRate()
Returns a value between0.0
and1.0
representing the ratio between the miss and request counts.long
Returns the number of times the cache had to use the network.default long
Returns the number of times a response wasn't read from cache due to a read failure.default long
Returns the number of times a response was successfully read from cache.long
Returns the number of requests intercepted by the cache.long
Returns the number of times a response wasn't written to cache due to a write failure.long
Returns 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.0
and1.0
representing the ratio between the hit and request counts. -
missRate
default double missRate()Returns a value between0.0
and1.0
representing the ratio between the miss and request counts. -
empty
Returns aStats
with zero counters.
-