Module methanol

Interface HttpCache.Stats

Enclosing class:
HttpCache

public static interface HttpCache.Stats
Statistics of an HttpCache.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a Stats with zero counters.
    long
    Returns the number of requests resulting in a cache hit, including conditional hits.
    default double
    Returns a value between 0.0 and 1.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
    Returns a value between 0.0 and 1.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 between 0.0 and 1.0 representing the ratio between the hit and request counts.
    • missRate

      default double missRate()
      Returns a value between 0.0 and 1.0 representing the ratio between the miss and request counts.
    • empty

      static HttpCache.Stats empty()
      Returns a Stats with zero counters.