|
||||||||||
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 | |
---|---|
protected RouterContext |
_context
|
static int |
TUNNEL_ACCEPT
tunnel acceptance |
Constructor Summary | |
---|---|
RouterThrottleImpl(RouterContext context)
|
Method Summary | |
---|---|
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? FIXME only called by SSU Receiver, not NTCP! FIXME should put warning on the console FIXME or should we do this at all? We have Codel queues all over now... |
int |
acceptTunnelRequest()
If we should send a reject, return a nonzero reject code. |
void |
cancelShutdownStatus()
|
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 |
setShutdownStatus()
|
void |
setTunnelStatus(String msg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final RouterContext _context
public static final int TUNNEL_ACCEPT
Constructor Detail |
---|
public RouterThrottleImpl(RouterContext context)
Method Detail |
---|
public boolean acceptNetworkMessage()
acceptNetworkMessage
in interface RouterThrottle
public boolean acceptNetDbLookupRequest(Hash key)
RouterThrottle
acceptNetDbLookupRequest
in interface RouterThrottle
public int acceptTunnelRequest()
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 setShutdownStatus()
setShutdownStatus
in interface RouterThrottle
public void cancelShutdownStatus()
cancelShutdownStatus
in interface RouterThrottle
public void setTunnelStatus(String msg)
setTunnelStatus
in interface RouterThrottle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |