net.i2p.router
class RouterThrottleImpl extends Object implements RouterThrottle
Modifier and Type | Field and Description |
---|---|
static int |
TUNNEL_ACCEPT
tunnel acceptance
|
Constructor and Description |
---|
RouterThrottleImpl(RouterContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptNetDbLookupRequest(Hash key)
Deprecated.
unused, function moved to netdb
|
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?
|
protected RouterContext |
getContext() |
double |
getInboundRateDelta()
How much faster (or if negative, slower) we are receiving data as
opposed to our longer term averages?
|
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 |
setTunnelStatus(String msg) |
public static final int TUNNEL_ACCEPT
public RouterThrottleImpl(RouterContext context)
public boolean acceptNetworkMessage()
RouterThrottle
acceptNetworkMessage
in interface RouterThrottle
public boolean acceptNetDbLookupRequest(Hash key)
RouterThrottle
acceptNetDbLookupRequest
in interface RouterThrottle
public int acceptTunnelRequest()
RouterThrottle
acceptTunnelRequest
in interface RouterThrottle
public long getMessageDelay()
RouterThrottle
getMessageDelay
in interface RouterThrottle
public long getTunnelLag()
RouterThrottle
getTunnelLag
in interface RouterThrottle
public double getInboundRateDelta()
RouterThrottle
getInboundRateDelta
in interface RouterThrottle
public String getTunnelStatus()
RouterThrottle
getTunnelStatus
in interface RouterThrottle
public void setTunnelStatus(String msg)
setTunnelStatus
in interface RouterThrottle
protected RouterContext getContext()