private static class MonitoringStatisticsProcessor.FloodingLogger
extends java.lang.Object
conditionallyLogFlooding()
, 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.Modifier and Type | Field and 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 and Description |
---|
FloodingLogger(java.util.Collection<?> collection)
Constructs Flooding Logger and associate it with given collection.
|
Modifier and Type | Method and Description |
---|---|
void |
conditionallyLogFlooding()
With a frequency of
FLOODING_WARNING_LOG_INTERVAL_MILLIS , a warning about flooding is logged if the size of
the associated collection is increasing. |
private static final int FLOODING_WARNING_LOG_INTERVAL_MILLIS
private final java.util.Collection<?> collection
private final long startTime
private int i
private int lastSize
public FloodingLogger(java.util.Collection<?> collection)
collection
- The collection to associate this flooding logger with.public void conditionallyLogFlooding()
FLOODING_WARNING_LOG_INTERVAL_MILLIS
, a warning about flooding is logged if the size of
the associated collection is increasing.