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 classBuilder of resource method statistics.(package private) static classFactory for creating and storing resource method statistics. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExecutionStatisticsprivate final ResourceMethodprivate final ExecutionStatistics -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateResourceMethodStatisticsImpl(ResourceMethod resourceMethod, ExecutionStatistics resourceMethodExecutionStatistics, ExecutionStatistics requestExecutionStatistics) -
Method Summary
Modifier and TypeMethodDescriptionGetexecution statisticsthat contain measurements of times only for execution of resource method.Getexecution statisticsthat 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 methodfor which thisResourceMethodStatisticsare 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:ResourceMethodStatisticsGetexecution statisticsthat 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:
getRequestStatisticsin interfaceResourceMethodStatistics- Returns:
- Execution statistics of entire request processing for one resource method.
-
getMethodStatistics
Description copied from interface:ResourceMethodStatisticsGetexecution statisticsthat 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:
getMethodStatisticsin interfaceResourceMethodStatistics- Returns:
- Execution statistics of one resource method.
-
getResourceMethod
Description copied from interface:ResourceMethodStatisticsGet aresource methodfor which thisResourceMethodStatisticsare calculated.- Specified by:
getResourceMethodin interfaceResourceMethodStatistics- Returns:
- Resource method.
-
snapshot
Description copied from interface:ResourceMethodStatisticsGet 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:
snapshotin interfaceResourceMethodStatistics- Returns:
- Snapshot of resource method statistics.
-