public interface ResourceMethodStatistics
snapshot()method returns an immutable snapshot with consistent data. The principles of using statistics is similar to principles of using
MonitoringStatistics. Statistics contain two
getMethodStatistics()contains statistics for execution of the code of resource method and
getRequestStatistics()contains statistics for complete processing of requests that were matched to the resource method. This implies that
getRequestStatistics()will tend to contain higher time measurements as they measure total request processing time and not only execution of the resource method. 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 method
snapshot()should be used.
See monitoring statistics for more details.
|Modifier and Type||Method and Description|
implementing class is immutable hence snapshot creation is not needed anymore
execution 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.
execution 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 by
resource methodfor which this
@Deprecated ResourceMethodStatistics snapshot()
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.