- All Known Implementing Classes:
ThresholdPolicyCount
public interface ThresholdPolicy<E>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Call this method each time to increment the policy's threshold count.boolean
Determines whether or not the configured threshold has been exceeded for this policy.void
reset()
Reset the policy back to the initial state.
-
Method Details
-
increment
Call this method each time to increment the policy's threshold count.- Parameters:
item
- The item that was added.
-
isThresholdExceeded
boolean isThresholdExceeded()Determines whether or not the configured threshold has been exceeded for this policy.- Returns:
true
if the threshold has been reached;false
otherwise.
-
reset
void reset()Reset the policy back to the initial state.
-