|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.RouterThrottleImpl
class RouterThrottleImpl
Simple throttle that basically stops accepting messages or nontrivial requests if the jobQueue lag is too large.
Field Summary | |
---|---|
static int |
TUNNEL_ACCEPT
tunnel acceptance |
Constructor Summary | |
---|---|
RouterThrottleImpl(RouterContext context)
|
Method Summary | |
---|---|
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? |
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) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TUNNEL_ACCEPT
Constructor Detail |
---|
public RouterThrottleImpl(RouterContext context)
Method Detail |
---|
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
protected RouterContext getContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |