Class DurationChecker

java.lang.Object
com.atlassian.confluence.impl.event.DurationChecker

public class DurationChecker extends Object
Helper class that is used to check whether time that has passed since previous event is exceeding a threshold
Since:
7.7.0
  • Field Details

  • Constructor Details

    • DurationChecker

      public DurationChecker(int defaultThresholdInSeconds)
    • DurationChecker

      public DurationChecker(int defaultThresholdInSeconds, LongSupplier nanoTime)
  • Method Details

    • getThresholdInSeconds

      public int getThresholdInSeconds()
      Amount of seconds that should pass between the events
    • thresholdElapsed

      public boolean thresholdElapsed()
      Checks whether amount of time that is passed between the events has exceeded the threshold
      Returns:
      True if amount of time exceeds the threshold or this is a first event