Class ResourceMethodStatisticsImpl
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ResourceMethodStatisticsImpl
- All Implemented Interfaces:
ResourceMethodStatistics
Immutable resource method statistics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Builder of resource method statistics.(package private) static class
Factory for creating and storing resource method statistics. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExecutionStatistics
private final ResourceMethod
private final ExecutionStatistics
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ResourceMethodStatisticsImpl
(ResourceMethod resourceMethod, ExecutionStatistics resourceMethodExecutionStatistics, ExecutionStatistics requestExecutionStatistics) -
Method Summary
Modifier and TypeMethodDescriptionGetexecution statistics
that contain measurements of times only for execution of resource method.Getexecution statistics
that contain measurements of times for whole processing from time when request comes into the Jersey application until the response is written to the underlying IO container.Get aresource method
for which thisResourceMethodStatistics
are calculated.snapshot()
Get the immutable and consistent snapshot of the monitoring statistics.
-
Field Details
-
resourceMethodExecutionStatistics
-
requestExecutionStatistics
-
resourceMethod
-
-
Constructor Details
-
ResourceMethodStatisticsImpl
private ResourceMethodStatisticsImpl(ResourceMethod resourceMethod, ExecutionStatistics resourceMethodExecutionStatistics, ExecutionStatistics requestExecutionStatistics)
-
-
Method Details
-
getRequestStatistics
Description copied from interface:ResourceMethodStatistics
Getexecution statistics
that contain measurements of times for whole processing from time when request comes into the Jersey application until the response is written to the underlying IO container. The statistics involves only requests that were matched to resource method defined byResourceMethodStatistics.getResourceMethod()
.- Specified by:
getRequestStatistics
in interfaceResourceMethodStatistics
- Returns:
- Execution statistics of entire request processing for one resource method.
-
getMethodStatistics
Description copied from interface:ResourceMethodStatistics
Getexecution statistics
that contain measurements of times only for execution of resource method. Durations average time, minimum time and maximum time measure only time of execution of resource method code. It does not involve other request processing phases.- Specified by:
getMethodStatistics
in interfaceResourceMethodStatistics
- Returns:
- Execution statistics of one resource method.
-
getResourceMethod
Description copied from interface:ResourceMethodStatistics
Get aresource method
for which thisResourceMethodStatistics
are calculated.- Specified by:
getResourceMethod
in interfaceResourceMethodStatistics
- Returns:
- Resource method.
-
snapshot
Description copied from interface:ResourceMethodStatistics
Get the immutable and consistent snapshot of the monitoring statistics. Working with snapshots might have negative performance impact as snapshot must be created but ensures consistency of data over time. However, the usage of snapshot is encouraged to avoid working with inconsistent data. Not all statistics must be updated in the same time on mutable version of statistics.- Specified by:
snapshot
in interfaceResourceMethodStatistics
- Returns:
- Snapshot of resource method statistics.
-