Class MonitoringStatisticsImpl
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.MonitoringStatisticsImpl
- All Implemented Interfaces:
MonitoringStatistics
Monitoring statistics implementation.
This object is loosely immutable (i.e.,
getResourceClassStatistics() and getUriStatistics() gets updated on
access). As a result, it is unnecessary to call snapshot().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classBuilder of monitoring statistics. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExceptionMapperStatisticsprivate final ExecutionStatisticsprivate final Map<Class<?>, ResourceStatistics> private final ResponseStatisticsprivate final Map<String, ResourceStatistics> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMonitoringStatisticsImpl(Map<String, ResourceStatistics> uriStatistics, Map<Class<?>, ResourceStatistics> resourceClassStatistics, ExecutionStatistics requestStatistics, ResponseStatistics responseStatistics, ExceptionMapperStatistics exceptionMapperStatistics) -
Method Summary
Modifier and TypeMethodDescriptionGet statistics about registeredexception mappers.Get the global application statistics of request execution.Map<Class<?>, ResourceStatistics> Refreshed (re-built) on every access.Get global application response statistics.Refreshed (re-built) on every access.snapshot()Get the immutable consistent snapshot of the monitoring statistics.
-
Field Details
-
requestStatistics
-
responseStatistics
-
exceptionMapperStatistics
-
uriStatistics
-
resourceClassStatistics
-
-
Constructor Details
-
MonitoringStatisticsImpl
private MonitoringStatisticsImpl(Map<String, ResourceStatistics> uriStatistics, Map<Class<?>, ResourceStatistics> resourceClassStatistics, ExecutionStatistics requestStatistics, ResponseStatistics responseStatistics, ExceptionMapperStatistics exceptionMapperStatistics)
-
-
Method Details
-
getRequestStatistics
Description copied from interface:MonitoringStatisticsGet the global application statistics of request execution. The statistics are not bound any specific resource or resource method and contains information about all requests that application handles.- Specified by:
getRequestStatisticsin interfaceMonitoringStatistics- Returns:
- Application request execution statistics.
-
getResponseStatistics
Description copied from interface:MonitoringStatisticsGet global application response statistics. The statistics are not bound any specific resource or resource method and contains information about all responses that application creates.- Specified by:
getResponseStatisticsin interfaceMonitoringStatistics- Returns:
- Application response statistics.
-
getUriStatistics
Refreshed (re-built) on every access.- Specified by:
getUriStatisticsin interfaceMonitoringStatistics- Returns:
- resource statistics
-
getResourceClassStatistics
Refreshed (re-built) on every access.- Specified by:
getResourceClassStatisticsin interfaceMonitoringStatistics- Returns:
- resource statistics
-
getExceptionMapperStatistics
Description copied from interface:MonitoringStatisticsGet statistics about registeredexception mappers.- Specified by:
getExceptionMapperStatisticsin interfaceMonitoringStatistics- Returns:
- Exception mapper statistics.
-
snapshot
Description copied from interface:MonitoringStatisticsGet the immutable 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 interfaceMonitoringStatistics- Returns:
- Snapshot of monitoring statistics.
-