java.lang.Object
net.i2p.client.streaming.impl.ConnectionManager.SynStrike
- Enclosing class:
ConnectionManager
A recorded SYN-burst strike, and how many distinct burst windows this dest has tripped inside the current strike window. Forgiveness ages from the strike TIME, not from the burst window that caused it: a burst window is only milliseconds long, so keying forgiveness to the window start (the pre-0.9.71+ value) forgave a strike almost immediately and the multi-strike autoban never fired.
strikeTime is the time of the MOST RECENT strike, so the window is rolling: a dest must produce every one of its strikes inside ConnectionManager.STRIKE_WINDOW_MS of the previous one to reach the ban count. A dest that trips once and then stays quiet for the window is forgiven.
Field Summary
FieldsModifier and TypeFieldDescription(package private) final intDistinct burst windows recorded in this run, including this one.(package private) final longClock time of the most recent strike (forgiveness ages from here).(package private) final longWindow start of the most recent burst (identity for same-window IGNORE).Constructor Summary
ConstructorsMethod Summary
Field Details
windowStart
final long windowStartWindow start of the most recent burst (identity for same-window IGNORE).strikeTime
final long strikeTimeClock time of the most recent strike (forgiveness ages from here).count
final int countDistinct burst windows recorded in this run, including this one.
Constructor Details
SynStrike
SynStrike(long windowStart, long strikeTime) A single strike, i.e. the first trip from this dest.- Parameters:
windowStart- window start of the burst that recorded the strikestrikeTime- clock time at which the strike was recorded
SynStrike
SynStrike(long windowStart, long strikeTime, int count) Records a strike with the running count of distinct burst windows seen for this dest.- Parameters:
windowStart- window start of the burst that recorded the strikestrikeTime- clock time at which the strike was recordedcount- distinct burst windows recorded so far, at least 1