net.i2p.router

## Interface RouterThrottle

- All Known Implementing Classes:
    RouterThrottleImpl

      public interface RouterThrottle

  Controls router load by throttling message processing and tunnel participation. Monitors system performance metrics to decide when to reject or limit activities based on current load and bandwidth constraints.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `acceptNetDbLookupRequest(Hash key)` Should we accept the netDb lookup message, replying either with the value or some closer peers, or should we simply drop it due to overload?
    `boolean` | `acceptNetworkMessage()` Should we accept any more data from the network for any sort of message, taking into account our current load, or should we simply slow down?
    `int` | `acceptTunnelRequest()` Should we accept the request to participate in the given tunnel, taking into account our current load and bandwidth usage commitments?
    `void` | `cancelShutdownStatus()`
    `String` | `getLocalizedTunnelStatus()` getTunnelStatus(), translated if available.
    `long` | `getMessageDelay()` How backed up we are at the moment processing messages (in milliseconds)
    `long` | `getTunnelLag()` How backed up our tunnels are at the moment (in milliseconds)
    `String` | `getTunnelStatus()` Message on the state of participating tunnel acceptance
    `void` | `setShutdownStatus()`
    `void` | `setTunnelStatus(String msg)`

- - ### Method Detail

    - #### acceptNetDbLookupRequest

          boolean acceptNetDbLookupRequest(Hash key)

      Should we accept the netDb lookup message, replying either with the value or some closer peers, or should we simply drop it due to overload?

    - #### acceptNetworkMessage

          boolean acceptNetworkMessage()

      Should we accept any more data from the network for any sort of message, taking into account our current load, or should we simply slow down?

    - #### acceptTunnelRequest

          int acceptTunnelRequest()

      Should we accept the request to participate in the given tunnel, taking into account our current load and bandwidth usage commitments?
      Returns:
        0 if it should be accepted, higher values for more severe rejection

    - #### cancelShutdownStatus

          void cancelShutdownStatus()

    - #### getLocalizedTunnelStatus

          String getLocalizedTunnelStatus()

      getTunnelStatus(), translated if available.

    - #### getMessageDelay

          long getMessageDelay()

      How backed up we are at the moment processing messages (in milliseconds)

    - #### getTunnelLag

          long getTunnelLag()

      How backed up our tunnels are at the moment (in milliseconds)

    - #### getTunnelStatus

          String getTunnelStatus()

      Message on the state of participating tunnel acceptance

    - #### setShutdownStatus

          void setShutdownStatus()

    - #### setTunnelStatus

          void setTunnelStatus(String msg)