Class DurationChecker
java.lang.Object
com.atlassian.confluence.impl.event.DurationChecker
Helper class that is used to check whether time that has passed since previous event is exceeding a threshold
- Since:
- 7.7.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDurationChecker
(int defaultThresholdInSeconds) DurationChecker
(int defaultThresholdInSeconds, LongSupplier nanoTime) -
Method Summary
Modifier and TypeMethodDescriptionint
Amount of seconds that should pass between the eventsboolean
Checks whether amount of time that is passed between the events has exceeded the threshold
-
Field Details
-
THRESHOLD_IN_SECONDS_KEY
- See Also:
-
-
Constructor Details
-
DurationChecker
public DurationChecker(int defaultThresholdInSeconds) -
DurationChecker
-
-
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
-