public class MetricServiceImpl extends Object implements org.wso2.carbon.metrics.manager.MetricService
MetricService, which will use the Metrics (https://dropwizard.github.io/metrics)
library. This is registered as an OSGi service| Modifier and Type | Class and Description |
|---|---|
static class |
MetricServiceImpl.Builder |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
cachedGauge(String name,
org.wso2.carbon.metrics.manager.Level level,
long timeout,
TimeUnit timeoutUnit,
org.wso2.carbon.metrics.manager.Gauge<T> gauge) |
org.wso2.carbon.metrics.manager.Counter |
counter(String name,
org.wso2.carbon.metrics.manager.Level... levels) |
void |
disable() |
void |
enable() |
<T> void |
gauge(String name,
org.wso2.carbon.metrics.manager.Level level,
org.wso2.carbon.metrics.manager.Gauge<T> gauge) |
org.wso2.carbon.metrics.manager.Counter |
getCounter(String name) |
org.wso2.carbon.metrics.manager.Histogram |
getHistogram(String name) |
org.wso2.carbon.metrics.manager.Meter |
getMeter(String name) |
org.wso2.carbon.metrics.manager.Level |
getMetricLevel(String name) |
int |
getMetricsCount() |
org.wso2.carbon.metrics.manager.Level |
getRootLevel() |
org.wso2.carbon.metrics.manager.Histogram |
histogram(String name,
org.wso2.carbon.metrics.manager.Level... levels) |
boolean |
isEnabled() |
org.wso2.carbon.metrics.manager.Meter |
meter(String name,
org.wso2.carbon.metrics.manager.Level... levels) |
boolean |
removeMetric(String name) |
void |
report()
For testing purposes
|
void |
setMetricLevel(String name,
org.wso2.carbon.metrics.manager.Level level) |
void |
setRootLevel(org.wso2.carbon.metrics.manager.Level level) |
org.wso2.carbon.metrics.manager.Timer |
timer(String name) |
org.wso2.carbon.metrics.manager.Timer |
timer(String name,
org.wso2.carbon.metrics.manager.Level level) |
public void enable()
enable in interface org.wso2.carbon.metrics.manager.MetricServicepublic void disable()
disable in interface org.wso2.carbon.metrics.manager.MetricServicepublic boolean isEnabled()
isEnabled in interface org.wso2.carbon.metrics.manager.MetricServicepublic org.wso2.carbon.metrics.manager.Level getMetricLevel(String name)
getMetricLevel in interface org.wso2.carbon.metrics.manager.MetricServicepublic void setMetricLevel(String name, org.wso2.carbon.metrics.manager.Level level)
setMetricLevel in interface org.wso2.carbon.metrics.manager.MetricServicepublic org.wso2.carbon.metrics.manager.Level getRootLevel()
getRootLevel in interface org.wso2.carbon.metrics.manager.MetricServicepublic void setRootLevel(org.wso2.carbon.metrics.manager.Level level)
setRootLevel in interface org.wso2.carbon.metrics.manager.MetricServicepublic org.wso2.carbon.metrics.manager.Meter getMeter(String name) throws org.wso2.carbon.metrics.manager.exception.MetricNotFoundException
getMeter in interface org.wso2.carbon.metrics.manager.MetricServiceorg.wso2.carbon.metrics.manager.exception.MetricNotFoundExceptionpublic boolean removeMetric(String name)
removeMetric in interface org.wso2.carbon.metrics.manager.MetricServicepublic org.wso2.carbon.metrics.manager.Meter meter(String name, org.wso2.carbon.metrics.manager.Level... levels)
meter in interface org.wso2.carbon.metrics.manager.MetricServicepublic org.wso2.carbon.metrics.manager.Counter getCounter(String name) throws org.wso2.carbon.metrics.manager.exception.MetricNotFoundException
getCounter in interface org.wso2.carbon.metrics.manager.MetricServiceorg.wso2.carbon.metrics.manager.exception.MetricNotFoundExceptionpublic org.wso2.carbon.metrics.manager.Counter counter(String name, org.wso2.carbon.metrics.manager.Level... levels)
counter in interface org.wso2.carbon.metrics.manager.MetricServicepublic org.wso2.carbon.metrics.manager.Timer timer(String name) throws org.wso2.carbon.metrics.manager.exception.MetricNotFoundException
timer in interface org.wso2.carbon.metrics.manager.MetricServiceorg.wso2.carbon.metrics.manager.exception.MetricNotFoundExceptionpublic org.wso2.carbon.metrics.manager.Timer timer(String name, org.wso2.carbon.metrics.manager.Level level)
timer in interface org.wso2.carbon.metrics.manager.MetricServicepublic org.wso2.carbon.metrics.manager.Histogram getHistogram(String name) throws org.wso2.carbon.metrics.manager.exception.MetricNotFoundException
getHistogram in interface org.wso2.carbon.metrics.manager.MetricServiceorg.wso2.carbon.metrics.manager.exception.MetricNotFoundExceptionpublic org.wso2.carbon.metrics.manager.Histogram histogram(String name, org.wso2.carbon.metrics.manager.Level... levels)
histogram in interface org.wso2.carbon.metrics.manager.MetricServicepublic <T> void gauge(String name, org.wso2.carbon.metrics.manager.Level level, org.wso2.carbon.metrics.manager.Gauge<T> gauge)
gauge in interface org.wso2.carbon.metrics.manager.MetricServicepublic <T> void cachedGauge(String name, org.wso2.carbon.metrics.manager.Level level, long timeout, TimeUnit timeoutUnit, org.wso2.carbon.metrics.manager.Gauge<T> gauge)
cachedGauge in interface org.wso2.carbon.metrics.manager.MetricServicepublic int getMetricsCount()
getMetricsCount in interface org.wso2.carbon.metrics.manager.MetricServicepublic void report()
report in interface org.wso2.carbon.metrics.manager.MetricServiceCopyright © 2014–2021 WSO2. All rights reserved.