Package net.i2p.router
Interface RouterThrottle
- All Known Implementing Classes:
RouterDoSThrottle
,RouterThrottleImpl
public interface RouterThrottle
Gatekeeper for deciding whether to throttle the further processing
of messages through the router. This is seperate from the bandwidth
limiting which simply makes sure the bytes transferred dont exceed the
bytes allowed (though the router throttle should take into account the
current bandwidth usage and limits when determining whether to accept or
reject certain activities, such as tunnels)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
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
Should we accept the request to participate in the given tunnel, taking into account our current load and bandwidth usage commitments?void
double
How much faster (or if negative, slower) we are receiving data as opposed to our longer term averages?getTunnelStatus(), translated if available.long
How backed up we are at the moment processing messages (in milliseconds)long
How backed up our tunnels are at the moment (in milliseconds)Message on the state of participating tunnel acceptancevoid
void
setTunnelStatus
(String msg)
-
Method Details
-
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
-
acceptNetDbLookupRequest
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? -
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) -
getInboundRateDelta
double getInboundRateDelta()How much faster (or if negative, slower) we are receiving data as opposed to our longer term averages? -
getTunnelStatus
String getTunnelStatus()Message on the state of participating tunnel acceptance -
setTunnelStatus
-
getLocalizedTunnelStatus
String getLocalizedTunnelStatus()getTunnelStatus(), translated if available.- Since:
- 0.9.45
-
setShutdownStatus
void setShutdownStatus()- Since:
- 0.8.12
-
cancelShutdownStatus
void cancelShutdownStatus()- Since:
- 0.8.12
-