public interface MetricHistoryManager
Modifier and Type | Field and Description |
---|---|
static int |
BASE_RETAIN_MINUTES |
static int |
BASE_UPDATE_MILLIS |
Modifier and Type | Method and Description |
---|---|
java.util.List<Datapoint> |
historyAfterDate(java.lang.String metricName,
java.util.Date date)
Returns all history for the metric that occurred after the specified date.
|
java.util.List<Datapoint> |
historyAll(java.lang.String metricName)
Returns all history for the metric.
|
java.util.List<Datapoint> |
historyInterpolated(java.lang.String metricName,
int density)
Returns all available history for the metric in a compressed form.
|
java.util.List<Datapoint> |
historyMostRecent(java.lang.String metricName,
int dataPoints)
Returns the most recent X datapoints for the metric.
|
boolean |
isRegistered(java.lang.String metricName) |
void |
record(java.lang.String metricId,
com.codahale.metrics.Metric metric) |
void |
record(java.lang.String metricId,
com.codahale.metrics.Metric metric,
int pollRateMillis,
int retainMinutes) |
void |
registerCounter(com.codahale.metrics.Counter counter,
java.lang.String counterPath)
Registers the counter in both the GatewayContext metricRegistry and in this history manager.
|
void |
registerCounter(com.codahale.metrics.Counter counter,
java.lang.String counterPath,
int pollRateMillis,
int retainMinutes)
Registers the counter in this history manager at the specified poll
rate in milliseconds.
|
void |
registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge,
java.lang.String gaugePath)
Registers the gauge in this history manager.
|
void |
registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge,
java.lang.String gaugePath,
int pollRateMillis,
int retainMinutes)
Registers the gauge in this history manager at the specified poll rate in milliseconds.
|
void |
registerMeter(com.codahale.metrics.Meter meter,
java.lang.String meterPath)
Registers the meter in both the GatewayContext metricRegistry and in this history manager.
|
void |
registerMeter(com.codahale.metrics.Meter meter,
java.lang.String meterPath,
int pollRateMillis,
int retainMinutes)
Registers the counter in this history manager at the specified poll rate in milliseconds.
|
void |
stopRecording(java.lang.String metricId) |
void |
unregisterMetric(java.lang.String metricPath)
Removes the metric this history manager.
|
static final int BASE_UPDATE_MILLIS
static final int BASE_RETAIN_MINUTES
void record(java.lang.String metricId, com.codahale.metrics.Metric metric)
void record(java.lang.String metricId, com.codahale.metrics.Metric metric, int pollRateMillis, int retainMinutes)
void stopRecording(java.lang.String metricId)
void registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge, java.lang.String gaugePath)
gaugePath
- the gauge can be retrieved at any time using this pathvoid registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge, java.lang.String gaugePath, int pollRateMillis, int retainMinutes)
gaugePath
- the gauge can be retrieved at any time using this pathvoid registerCounter(com.codahale.metrics.Counter counter, java.lang.String counterPath)
counterPath
- the counter can be retrieved at any time using this pathvoid registerCounter(com.codahale.metrics.Counter counter, java.lang.String counterPath, int pollRateMillis, int retainMinutes)
counterPath
- the counter can be retrieved at any time using this pathvoid registerMeter(com.codahale.metrics.Meter meter, java.lang.String meterPath)
void registerMeter(com.codahale.metrics.Meter meter, java.lang.String meterPath, int pollRateMillis, int retainMinutes)
void unregisterMetric(java.lang.String metricPath)
metricPath
- the path that was originally used to register the metric.java.util.List<Datapoint> historyAll(java.lang.String metricName) throws java.sql.SQLException
java.sql.SQLException
java.util.List<Datapoint> historyMostRecent(java.lang.String metricName, int dataPoints) throws java.sql.SQLException
dataPoints
- the most recent X datapoints to returnjava.sql.SQLException
java.util.List<Datapoint> historyInterpolated(java.lang.String metricName, int density) throws java.sql.SQLException
java.sql.SQLException
java.util.List<Datapoint> historyAfterDate(java.lang.String metricName, java.util.Date date) throws java.sql.SQLException
java.sql.SQLException
boolean isRegistered(java.lang.String metricName)