Class MonitoringStatisticsProcessor.FloodingLogger

  • Enclosing class:
    MonitoringStatisticsProcessor

    private static class MonitoringStatisticsProcessor.FloodingLogger
    extends java.lang.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.

    • Constructor Summary

      Constructors 
      Constructor Description
      FloodingLogger​(java.util.Collection<?> collection)
      Constructs Flooding Logger and associate it with given collection.
    • 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
    • Constructor Detail

      • FloodingLogger

        public FloodingLogger​(java.util.Collection<?> collection)
        Constructs Flooding Logger and associate it with given collection.
        Parameters:
        collection - The collection to associate this flooding logger with.
    • Method Detail

      • 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.