org.apache.cassandra.metrics

## Class LatencyMetrics

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

Direct Known Subclasses:
  ClientRequestMetrics

    public class LatencyMetrics
    extends java.lang.Object

Metrics about latencies

### Field Summary

Fields
`protected MetricNameFactory` `aliasFactory`
`protected MetricNameFactory` `factory`
`com.codahale.metrics.Timer` `latency` Latency
`protected java.lang.String` `namePrefix`
`com.codahale.metrics.Counter` `totalLatency` Total latency in micro sec

### Constructor Summary

Constructors
Constructor and Description
`LatencyMetrics(MetricNameFactory factory, MetricNameFactory aliasFactory, java.lang.String namePrefix)`
`LatencyMetrics(MetricNameFactory factory, java.lang.String namePrefix)` Create LatencyMetrics with given group, type, prefix to append to each metric name, and scope.
`LatencyMetrics(MetricNameFactory factory, java.lang.String namePrefix, LatencyMetrics... parents)` Create LatencyMetrics with given group, type, prefix to append to each metric name, and scope.
`LatencyMetrics(java.lang.String type, java.lang.String scope)` Create LatencyMetrics with given group, type, and scope.
`LatencyMetrics(java.lang.String type, java.lang.String namePrefix, java.lang.String scope)` Create LatencyMetrics with given group, type, prefix to append to each metric name, and scope.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addNano(long nanos)` takes nanoseconds
`void` `release()`

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

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

### Field Detail

#### latency

    public final com.codahale.metrics.Timer latency

Latency

#### totalLatency

    public final com.codahale.metrics.Counter totalLatency

Total latency in micro sec

#### factory

    protected final MetricNameFactory factory

#### aliasFactory

    protected final MetricNameFactory aliasFactory

#### namePrefix

    protected final java.lang.String namePrefix

### Constructor Detail

#### LatencyMetrics

    public LatencyMetrics(java.lang.String type,
                          java.lang.String scope)

Create LatencyMetrics with given group, type, and scope. Name prefix for each metric will be empty.

Parameters:
  `type` - Type name
  `scope` - Scope

#### LatencyMetrics

    public LatencyMetrics(java.lang.String type,
                          java.lang.String namePrefix,
                          java.lang.String scope)

Create LatencyMetrics with given group, type, prefix to append to each metric name, and scope.

Parameters:
  `type` - Type name
  `namePrefix` - Prefix to append to each metric name
  `scope` - Scope of metrics

#### LatencyMetrics

    public LatencyMetrics(MetricNameFactory factory,
                          java.lang.String namePrefix)

Create LatencyMetrics with given group, type, prefix to append to each metric name, and scope.

Parameters:
  `factory` - MetricName factory to use
  `namePrefix` - Prefix to append to each metric name

#### LatencyMetrics

    public LatencyMetrics(MetricNameFactory factory,
                          MetricNameFactory aliasFactory,
                          java.lang.String namePrefix)

#### LatencyMetrics

    public LatencyMetrics(MetricNameFactory factory,
                          java.lang.String namePrefix,
                          LatencyMetrics... parents)

Create LatencyMetrics with given group, type, prefix to append to each metric name, and scope. Any updates to this will also run on parent

Parameters:
  `factory` - MetricName factory to use
  `namePrefix` - Prefix to append to each metric name
  `parents` - any amount of parents to replicate updates to

### Method Detail

#### addNano

    public void addNano(long nanos)

takes nanoseconds

#### release

    public void release()