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 SummaryFields Modifier and Type Field Description static StringTHRESHOLD_IN_SECONDS_KEY
 - 
Constructor SummaryConstructors Constructor Description DurationChecker(int defaultThresholdInSeconds)DurationChecker(int defaultThresholdInSeconds, LongSupplier nanoTime)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetThresholdInSeconds()Amount of seconds that should pass between the eventsbooleanthresholdElapsed()Checks whether amount of time that is passed between the events has exceeded the threshold
 
- 
- 
- 
Field Detail- 
THRESHOLD_IN_SECONDS_KEYpublic static final String THRESHOLD_IN_SECONDS_KEY - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
DurationCheckerpublic DurationChecker(int defaultThresholdInSeconds) 
 - 
DurationCheckerpublic DurationChecker(int defaultThresholdInSeconds, LongSupplier nanoTime)
 
- 
 - 
Method Detail- 
getThresholdInSecondspublic int getThresholdInSeconds() Amount of seconds that should pass between the events
 - 
thresholdElapsedpublic 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
 
 
- 
 
-