public abstract class AbstractCompositeMetrics
extends java.lang.Object
Constructor and Description |
---|
AbstractCompositeMetrics(long maxLength)
Create instance of the composite metric.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name,
long delta)
Adds value to the metric and occasionally creates new metric
if the delta is out of the exiting metric span.
|
Metrics |
getMetrics(java.lang.String name) |
protected abstract Metrics |
nextMetrics(long start,
long end)
Called by child class when new metrics is needed.
|
public AbstractCompositeMetrics(long maxLength)
maxLength
- max time window in milliseconds.protected abstract Metrics nextMetrics(long start, long end)
start
- of the time span.end
- of the time span.public void add(java.lang.String name, long delta)
name
- name of the metric.delta
- value to increment.public Metrics getMetrics(java.lang.String name)
© 2017–2018 Mapbox. All rights reserved.