Class MonitoringStatisticsProcessor.FloodingLogger
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.MonitoringStatisticsProcessor.FloodingLogger
-
- Enclosing class:
- MonitoringStatisticsProcessor
private static class MonitoringStatisticsProcessor.FloodingLogger extends java.lang.Object
Upon calling ofconditionallyLogFlooding()
, flooding logger conditionally checks for the size of the associated collection and if its size increases a warning about flooding is logged. The purpose of this flooding logger facility is to warn about disability to decrease the size of given collection which leads to never ending looping while trying to empty that collection in a loop.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<?>
collection
private static int
FLOODING_WARNING_LOG_INTERVAL_MILLIS
The frequency of logging a warning about the request queue being flooded.private int
i
private int
lastSize
private long
startTime
-
Constructor Summary
Constructors Constructor Description FloodingLogger(java.util.Collection<?> collection)
Constructs Flooding Logger and associate it with given collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
conditionallyLogFlooding()
With a frequency ofFLOODING_WARNING_LOG_INTERVAL_MILLIS
, a warning about flooding is logged if the size of the associated collection is increasing.
-
-
-
Field Detail
-
FLOODING_WARNING_LOG_INTERVAL_MILLIS
private static final int FLOODING_WARNING_LOG_INTERVAL_MILLIS
The frequency of logging a warning about the request queue being flooded.- See Also:
- Constant Field Values
-
collection
private final java.util.Collection<?> collection
-
startTime
private final long startTime
-
i
private int i
-
lastSize
private int lastSize
-
-
Method Detail
-
conditionallyLogFlooding
public void conditionallyLogFlooding()
With a frequency ofFLOODING_WARNING_LOG_INTERVAL_MILLIS
, a warning about flooding is logged if the size of the associated collection is increasing.
-
-