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
`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>` `hitRate` cache hit rate
`com.codahale.metrics.Meter` `hits` Total number of cache hits
`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

cache 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