Class MonitoringStatisticsProcessor.FloodingLogger
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.MonitoringStatisticsProcessor.FloodingLogger
- Enclosing class:
MonitoringStatisticsProcessor
Upon calling of
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection
<?> private static final int
The frequency of logging a warning about the request queue being flooded.private int
private int
private final long
-
Constructor Summary
ConstructorsConstructorDescriptionFloodingLogger
(Collection<?> collection) Constructs Flooding Logger and associate it with given collection. -
Method Summary
Modifier and TypeMethodDescriptionvoid
With a frequency ofFLOODING_WARNING_LOG_INTERVAL_MILLIS
, a warning about flooding is logged if the size of the associated collection is increasing.
-
Field Details
-
FLOODING_WARNING_LOG_INTERVAL_MILLIS
private static final int FLOODING_WARNING_LOG_INTERVAL_MILLISThe frequency of logging a warning about the request queue being flooded.- See Also:
-
collection
-
startTime
private final long startTime -
i
private int i -
lastSize
private int lastSize
-
-
Constructor Details
-
FloodingLogger
Constructs Flooding Logger and associate it with given collection.- Parameters:
collection
- The collection to associate this flooding logger with.
-
-
Method Details
-
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.
-