org.glassfish.jersey.server.internal.monitoring
Class TimeWindowStatisticsImpl
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.TimeWindowStatisticsImpl
- All Implemented Interfaces:
- TimeWindowStatistics
public class TimeWindowStatisticsImpl
- extends Object
- implements TimeWindowStatistics
Time window statistics
implementation.
- Author:
- Miroslav Fuksa (miroslav.fuksa at oracle.com)
Method Summary |
long |
getAverageDuration()
Returns the average duration (processing time) in milliseconds of the request processing measured
in the time window. |
long |
getMaximumDuration()
Returns the maximum duration (processing time) in milliseconds of the request processing measured
in the time window. |
long |
getMinimumDuration()
Returns the minimum duration (processing time) in milliseconds of the request processing measured
in the time window. |
long |
getRequestCount()
Returns the count of requests received measured in the time window. |
double |
getRequestsPerSecond()
Returns average value of how many requests per second were received by application in the time window. |
long |
getTimeWindow()
Returns the size of time window in milliseconds. |
TimeWindowStatistics |
snapshot()
Get the immutable and consistent snapshot of the monitoring statistics. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getTimeWindow
public long getTimeWindow()
- Description copied from interface:
TimeWindowStatistics
- Returns the size of time window in milliseconds. Returned value denotes in how many last milliseconds
the statistics are evaluated.
- Specified by:
getTimeWindow
in interface TimeWindowStatistics
- Returns:
- Time window in milliseconds.
getRequestsPerSecond
public double getRequestsPerSecond()
- Description copied from interface:
TimeWindowStatistics
- Returns average value of how many requests per second were received by application in the time window.
- Specified by:
getRequestsPerSecond
in interface TimeWindowStatistics
- Returns:
- Average of requests per second.
getMinimumDuration
public long getMinimumDuration()
- Description copied from interface:
TimeWindowStatistics
- Returns the minimum duration (processing time) in milliseconds of the request processing measured
in the time window.
The time measures the
processing of the request since the start of request processing by Jersey until the response is
written or request processing fails and all resources for request processing are released.
- Specified by:
getMinimumDuration
in interface TimeWindowStatistics
- Returns:
- Minimum processing time of the request or -1 if no request has been processed.
getMaximumDuration
public long getMaximumDuration()
- Description copied from interface:
TimeWindowStatistics
- Returns the maximum duration (processing time) in milliseconds of the request processing measured
in the time window.
processing of the request since the start of request processing by Jersey until the response is
written or request processing fails and all resources for request processing are released.
- Specified by:
getMaximumDuration
in interface TimeWindowStatistics
- Returns:
- Maximum processing time of the request or -1 if no request has been processed.
getRequestCount
public long getRequestCount()
- Description copied from interface:
TimeWindowStatistics
- Returns the count of requests received measured in the time window.
- Specified by:
getRequestCount
in interface TimeWindowStatistics
- Returns:
- Count of requests that were handled by the application.
snapshot
public TimeWindowStatistics snapshot()
- Description copied from interface:
TimeWindowStatistics
- Get 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:
snapshot
in interface TimeWindowStatistics
- Returns:
- Snapshot of time window statistics.
getAverageDuration
public long getAverageDuration()
- Description copied from interface:
TimeWindowStatistics
- Returns the average duration (processing time) in milliseconds of the request processing measured
in the time window.
The time measures the
processing of the request since the start of request processing by Jersey until the response is
written or request processing fails and all resources for request processing are released.
- Specified by:
getAverageDuration
in interface TimeWindowStatistics
- Returns:
- Average processing time of the request or -1 if no request has been processed.
Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.