class AccessCounter extends Object
Constructor and Description |
---|
AccessCounter() |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
isBreached(Threshold threshold,
long now) |
(package private) boolean |
purge(long olderThan)
Purges old accesses from the list.
|
(package private) void |
recordAccess(long now)
records that a connection attempt was made
|
void recordAccess(long now)
now
- the current timeboolean isBreached(Threshold threshold, long now)
threshold
- definition of a thresholdnow
- current timeboolean purge(long olderThan)
olderThan
- remove all accesses older than the given timestamp