Interface ResourceStatistics
-
public interface ResourceStatistics
Monitoring statistics of the resource. The resource is a set of resource methods with specific characteristics that is not defined by this interface. The resource can be set of resource methods that are accessible on the same URI (in the case ofMonitoringStatistics.getUriStatistics()
) or the set of resource methods defined in oneClass
(in case ofMonitoringStatistics.getResourceClassStatistics()
). Statistics retrieved from Jersey runtime might be mutable and thanks to it might provide inconsistent data as not all statistics are updated in the same time. To retrieve the immutable and consistent statistics data the methodsnapshot()
should be used. The principles of using statistics is similar to principles of usingMonitoringStatistics
.- Author:
- Miroslav Fuksa
- See Also:
See monitoring statistics for general details about statistics.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ExecutionStatistics
getRequestExecutionStatistics()
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.ExecutionStatistics
getResourceMethodExecutionStatistics()
Getexecution statistics
that contain measurements of times only for execution of resource methods.Map<ResourceMethod,ResourceMethodStatistics>
getResourceMethodStatistics()
Return the statistics for resource method.ResourceStatistics
snapshot()
Deprecated.implementing class is immutable hence snapshot creation is not needed anymore
-
-
-
Method Detail
-
getResourceMethodExecutionStatistics
ExecutionStatistics getResourceMethodExecutionStatistics()
Getexecution statistics
that contain measurements of times only for execution of resource methods. Durations average time, minimum time and maximum time measure only time of execution of resource methods code. It does not involve other request processing phases.- Returns:
- Execution statistics of all resource method in this resource.
-
getRequestExecutionStatistics
ExecutionStatistics getRequestExecutionStatistics()
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 methods defined ingetResourceMethodStatistics()
.- Returns:
- Execution statistics of entire request processing for all resource method from this resource.
-
getResourceMethodStatistics
Map<ResourceMethod,ResourceMethodStatistics> getResourceMethodStatistics()
Return the statistics for resource method. Keys of returned map areresource methods
available in the resource and values are execution statistics of these resource methods.- Returns:
- Map with
resource method
keys and correspondingresource method statistics
.
-
snapshot
@Deprecated ResourceStatistics snapshot()
Deprecated.implementing class is immutable hence snapshot creation is not needed anymoreGet 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.- Returns:
- Snapshot of resource statistics.
-
-