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 class
Builder of monitoring statistics. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExceptionMapperStatistics
private final ExecutionStatistics
private final Map<Class<?>,
ResourceStatistics> private final ResponseStatistics
private final Map<String,
ResourceStatistics> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
MonitoringStatisticsImpl
(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.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:MonitoringStatistics
Get 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:
getRequestStatistics
in interfaceMonitoringStatistics
- Returns:
- Application request execution statistics.
-
getResponseStatistics
Description copied from interface:MonitoringStatistics
Get 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:
getResponseStatistics
in interfaceMonitoringStatistics
- Returns:
- Application response statistics.
-
getUriStatistics
Refreshed (re-built) on every access.- Specified by:
getUriStatistics
in interfaceMonitoringStatistics
- Returns:
- resource statistics
-
getResourceClassStatistics
Refreshed (re-built) on every access.- Specified by:
getResourceClassStatistics
in interfaceMonitoringStatistics
- Returns:
- resource statistics
-
getExceptionMapperStatistics
Description copied from interface:MonitoringStatistics
Get statistics about registeredexception mappers
.- Specified by:
getExceptionMapperStatistics
in interfaceMonitoringStatistics
- Returns:
- Exception mapper statistics.
-
snapshot
Description copied from interface:MonitoringStatistics
Get 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:
snapshot
in interfaceMonitoringStatistics
- Returns:
- Snapshot of monitoring statistics.
-