Class MonitoringStatisticsProcessor.FloodingLogger

java.lang.Object
org.glassfish.jersey.server.internal.monitoring.MonitoringStatisticsProcessor.FloodingLogger
Enclosing class:
MonitoringStatisticsProcessor

private static class MonitoringStatisticsProcessor.FloodingLogger extends Object
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 Details

    • 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:
    • collection

      private final Collection<?> collection
    • startTime

      private final long startTime
    • i

      private int i
    • lastSize

      private int lastSize
  • Constructor Details

    • FloodingLogger

      public FloodingLogger(Collection<?> collection)
      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 of FLOODING_WARNING_LOG_INTERVAL_MILLIS, a warning about flooding is logged if the size of the associated collection is increasing.