Package com.github.ambry.rest
Class RestRequestMetrics
- java.lang.Object
-
- com.github.ambry.rest.RestRequestMetrics
-
public class RestRequestMetrics extends java.lang.Object
A metrics object that is provided as input toRestRequestMetricsTracker.injectMetrics(RestRequestMetrics)
. It is expected that each request type will have it's own instance of RestRequestMetrics and the same instance is used to track all requests of that type.
-
-
Constructor Summary
Constructors Constructor Description RestRequestMetrics(java.lang.Class ownerClass, java.lang.String requestType, com.codahale.metrics.MetricRegistry metricRegistry)
Creates an instance of RestRequestMetrics forrequestType
and attaches all the metrics related to the request to the givenownerClass
.
-
-
-
Constructor Detail
-
RestRequestMetrics
public RestRequestMetrics(java.lang.Class ownerClass, java.lang.String requestType, com.codahale.metrics.MetricRegistry metricRegistry)
Creates an instance of RestRequestMetrics forrequestType
and attaches all the metrics related to the request to the givenownerClass
. The metrics are also registered in the providedmetricRegistry
.- Parameters:
ownerClass
- theClass
that is supposed to own the metrics created by this tracker.requestType
- the type of request for which a tracker is being created.metricRegistry
- theMetricRegistry
to use to register the created metrics.
-
-