java.lang.Object
net.i2p.router.transport.ntcp.EventPumper.InboundFloodDecision
- Enclosing class:
EventPumper
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 Summary
FieldsModifier and TypeFieldDescription(package private) static final EventPumper.InboundFloodDecisionConstant for "accept, nothing to report", reused on every non-drop path.Method Summary
All MethodsModifier and TypeMethodDescription(package private) intThe accept rate the decision was projected from.(package private) intThe accept count the rate was measured against.(package private) intThe nominal share of inbound connections to refuse.(package private) booleanisDrop()Whether to refuse the connection, per the flood decision.
Field Details
ALLOW
Constant for "accept, nothing to report", reused on every non-drop path.
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