|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.iges.anagram.filter.AbuseFilter.HitLimiter
Tracks hits/hour, and switches to a blocked state if the number exceeds a given threshold.
| Method Summary | |
void |
addHit(long now)
Registers a hit at the time given |
boolean |
exceeded(long now,
long hitLimit)
Checks whether the hit limit has been exceeded |
java.lang.String |
getMessage(long timeoutMins)
|
boolean |
isBlocked(long now,
long timeoutMins)
Checks whether a block is in force |
boolean |
isStale(long now,
long staleTime)
Indicates whether this limiter has had a hit recently. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public java.lang.String getMessage(long timeoutMins)
public boolean isBlocked(long now,
long timeoutMins)
public boolean exceeded(long now,
long hitLimit)
public boolean isStale(long now,
long staleTime)
public void addHit(long now)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||