Class LRAMetricService
java.lang.Object
org.eclipse.microprofile.lra.tck.service.LRAMetricService
Metric service is a storage container that test beans may use to store data about processing. It stores number of
call types (defined by
LRAMetricService.LRAMetric) per LRA id per participant.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the metric storage as whole.intgetMetric(LRAMetricType metricType, URI lraId) Returns count number for particular metric type.intgetMetric(LRAMetricType metricType, URI lraId, Class<?> participantClazz) Returns count number for particular metric type filtered by LRA id and the participant class which defines the participant name (the fully qualified class name is used for it).intgetMetric(LRAMetricType metricType, URI lraId, String participantClassName) Returns count number for particular metric type filtered by LRA id and the participant's name.intgetMetricAll(LRAMetricType metricType) Returns count number for particular metric type regardless of the LRA id or the participant's name.voidincrementMetric(LRAMetricType metricType, URI lraId, Class<?> participantClazz) It increments counter of the metric type for particular LRA id and particular participant class which is translated to fully qualified class name as participant name.
-
Constructor Details
-
LRAMetricService
public LRAMetricService()
-
-
Method Details
-
incrementMetric
It increments counter of the metric type for particular LRA id and particular participant class which is translated to fully qualified class name as participant name.- Parameters:
metricType- increment counter of the specific metric typelraId- increment counter of the metric type assigned to this particular lra idparticipantClazz- the participant class which the metric increment is accounted to
-
getMetricAll
Returns count number for particular metric type regardless of the LRA id or the participant's name.- Parameters:
metricType- metric type to take sum of the metric counter for- Returns:
- sum of metric counters if of the particular metric type
-
getMetric
Returns count number for particular metric type.- Parameters:
metricType- counter for which the metric type will be returnedlraId- counter for which lra id will be returned- Returns:
- metric counter defined based on the method parameters
-
getMetric
Returns count number for particular metric type filtered by LRA id and the participant class which defines the participant name (the fully qualified class name is used for it).- Parameters:
metricType- counter for which the metric type will be returnedlraId- counter for which lra id will be returnedparticipantClazz- counter for which the participant will be returned- Returns:
- metric counter defined based on the method parameters
-
getMetric
Returns count number for particular metric type filtered by LRA id and the participant's name. It's expected that the participant name is defined as fully qualified participant class name.- Parameters:
metricType- counter for which metric type will be returnedlraId- counter for which lra id will be returnedparticipantClassName- counter for which the participant name will be returned- Returns:
- metric counter defined based on the method parameters
-
clear
public void clear()Clear the metric storage as whole.
-