java.lang.Object
net.i2p.router.transport.ntcp.EventPumper.InboundFloodDecision
Enclosing class:
EventPumper

static final class EventPumper.InboundFloodDecisionextends Object
Outcome of EventPumper.evaluateInboundFlood(long, int, int, long, boolean, int, int, RandomSource): whether to reject the incoming connection plus the numbers used in the warn log, so the caller stays side-effect free.
  • Field Details

  • Method Details

    • isDrop

      boolean isDrop()
      Whether to refuse the connection, per the flood decision.
      Returns:
      true if the connection should be rejected
    • getPercent

      int getPercent()
      The nominal share of inbound connections to refuse.
      Returns:
      nominal rejection chance percent (0 renders as "1%")
    • getLastConnections

      int getLastConnections()
      The accept count the rate was measured against.
      Returns:
      baseline connections in the previous full rate period
    • getCurrentConnectionsPerMinute

      int getCurrentConnectionsPerMinute()
      The accept rate the decision was projected from.
      Returns:
      projected current accept rate in connections per minute