org.apache.cassandra.metrics

## Class CacheMetrics

- java.lang.Object
- - org.apache.cassandra.metrics.CacheMetrics

-     public class CacheMetrics
      extends java.lang.Object

  Metrics for `ICache`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `com.codahale.metrics.Gauge<java.lang.Long>` | `capacity` Cache capacity in bytes
    `com.codahale.metrics.Gauge<java.lang.Integer>` | `entries` Total number of cache entries
    `com.codahale.metrics.Gauge<java.lang.Double>` | `fifteenMinuteHitRate` 15m hit rate
    `com.codahale.metrics.Gauge<java.lang.Double>` | `fiveMinuteHitRate` 5m hit rate
    `com.codahale.metrics.Gauge<java.lang.Double>` | `hitRate` all time cache hit rate
    `com.codahale.metrics.Meter` | `hits` Total number of cache hits
    `com.codahale.metrics.Gauge<java.lang.Double>` | `oneMinuteHitRate` 1m hit rate
    `com.codahale.metrics.Meter` | `requests` Total number of cache requests
    `com.codahale.metrics.Gauge<java.lang.Long>` | `size` Total size of cache, in bytes

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheMetrics(java.lang.String type, ICache<?,?> cache)` Create metrics for given cache.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### capacity

          public final com.codahale.metrics.Gauge<java.lang.Long> capacity

      Cache capacity in bytes

    - #### hits

          public final com.codahale.metrics.Meter hits

      Total number of cache hits

    - #### requests

          public final com.codahale.metrics.Meter requests

      Total number of cache requests

    - #### hitRate

          public final com.codahale.metrics.Gauge<java.lang.Double> hitRate

      all time cache hit rate

    - #### oneMinuteHitRate

          public final com.codahale.metrics.Gauge<java.lang.Double> oneMinuteHitRate

      1m hit rate

    - #### fiveMinuteHitRate

          public final com.codahale.metrics.Gauge<java.lang.Double> fiveMinuteHitRate

      5m hit rate

    - #### fifteenMinuteHitRate

          public final com.codahale.metrics.Gauge<java.lang.Double> fifteenMinuteHitRate

      15m hit rate

    - #### size

          public final com.codahale.metrics.Gauge<java.lang.Long> size

      Total size of cache, in bytes

    - #### entries

          public final com.codahale.metrics.Gauge<java.lang.Integer> entries

      Total number of cache entries

  - ### Constructor Detail

    - #### CacheMetrics

          public CacheMetrics(java.lang.String type,
                              ICache<?,?> cache)

      Create metrics for given cache.
      Parameters:
        `type` - Type of Cache to identify metrics.
        `cache` - Cache to measure metrics

Copyright © 2018 The Apache Software Foundation