CacheMetrics (apache-cassandra API)
Date: 2014-10-21

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.yammer.metrics.core.Gauge<java.lang.Long>` | `capacity` Cache capacity in bytes
    `com.yammer.metrics.core.Gauge<java.lang.Integer>` | `entries` Total number of cache entries
    `com.yammer.metrics.core.Gauge<java.lang.Double>` | `hitRate` cache hit rate
    `com.yammer.metrics.core.Meter` | `hits` Total number of cache hits
    `com.yammer.metrics.core.Meter` | `requests` Total number of cache requests
    `com.yammer.metrics.core.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
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getRecentHitRate()` Deprecated.

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

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

- - ### Field Detail

    - #### capacity

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

      Cache capacity in bytes

    - #### hits

          public final com.yammer.metrics.core.Meter hits

      Total number of cache hits

    - #### requests

          public final com.yammer.metrics.core.Meter requests

      Total number of cache requests

    - #### hitRate

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

      cache hit rate

    - #### size

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

      Total size of cache, in bytes

    - #### entries

          public final com.yammer.metrics.core.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

  - ### Method Detail

    - #### getRecentHitRate

          @Deprecated
          public double getRecentHitRate()

      Deprecated.

Copyright © 2014 The Apache Software Foundation