public class RecentEventsCounter
extends java.lang.Object
| Constructor and Description |
|---|
RecentEventsCounter(int maxEvents,
java.time.Duration duringDuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
countEvent() |
void |
countEvent(java.util.Date now,
java.lang.String eventInfo) |
void |
countEvent(java.lang.String eventInfo) |
int |
countOfEventsWithinDuration() |
java.time.Duration |
getDuringDuration() |
int |
getMaxAllowedEvents() |
boolean |
theseEventsWouldExceedLimit(int count)
Convenience method to check if the given number of events would cause the max. limit to be exceeded.
|
boolean |
thisEventExceedsLimit() |
boolean |
thisEventExceedsLimit(java.util.Date now) |
boolean |
thisEventExceedsLimit(java.util.Date now,
java.lang.String eventInfo) |
boolean |
thisEventWouldExceedLimit()
Convenience method to check if one more event ("this event") would cause the max. limit to be exceeded.
|
void |
updateSettings(int maxEvents,
java.time.Duration duringDuration) |
public RecentEventsCounter(int maxEvents,
java.time.Duration duringDuration)
public void updateSettings(int maxEvents,
java.time.Duration duringDuration)
public boolean thisEventWouldExceedLimit()
public boolean theseEventsWouldExceedLimit(int count)
count more events would exceed the limit, false if notpublic boolean thisEventExceedsLimit()
public boolean thisEventExceedsLimit(java.util.Date now)
public boolean thisEventExceedsLimit(java.util.Date now,
java.lang.String eventInfo)
public void countEvent()
public void countEvent(java.lang.String eventInfo)
public void countEvent(java.util.Date now,
java.lang.String eventInfo)
public int countOfEventsWithinDuration()
public int getMaxAllowedEvents()
public java.time.Duration getDuringDuration()
Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.