java.lang.Object
net.i2p.client.streaming.impl.ConnectionManager.SynStrike
Enclosing class:
ConnectionManager

static final class ConnectionManager.SynStrikeextends Object
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

    Fields
    Modifier and Type
    Field
    Description
    (package private) final int
    Distinct burst windows recorded in this run, including this one.
    (package private) final long
    Clock time of the most recent strike (forgiveness ages from here).
    (package private) final long
    Window start of the most recent burst (identity for same-window IGNORE).
  • Constructor Summary

    Constructors
    Constructor
    Description
    SynStrike(long windowStart, long strikeTime)
    A single strike, i.e.
    SynStrike(long windowStart, long strikeTime, int count)
    Records a strike with the running count of distinct burst windows seen for this dest.
  • Method Summary

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • windowStart

      final long windowStart
      Window start of the most recent burst (identity for same-window IGNORE).
    • strikeTime

      final long strikeTime
      Clock time of the most recent strike (forgiveness ages from here).
    • count

      final int count
      Distinct 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 strike
      strikeTime - 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 strike
      strikeTime - clock time at which the strike was recorded
      count - distinct burst windows recorded so far, at least 1