|
||||||||||
| 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? |
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()
|
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()
RouterThrottle
acceptNetworkMessage in interface RouterThrottlepublic boolean acceptNetDbLookupRequest(Hash key)
RouterThrottle
acceptNetDbLookupRequest in interface RouterThrottlepublic int acceptTunnelRequest()
RouterThrottle
acceptTunnelRequest in interface RouterThrottlepublic long getMessageDelay()
RouterThrottle
getMessageDelay in interface RouterThrottlepublic long getTunnelLag()
RouterThrottle
getTunnelLag in interface RouterThrottlepublic double getInboundRateDelta()
RouterThrottle
getInboundRateDelta in interface RouterThrottlepublic String getTunnelStatus()
RouterThrottle
getTunnelStatus in interface RouterThrottlepublic void setShutdownStatus()
setShutdownStatus in interface RouterThrottlepublic void cancelShutdownStatus()
cancelShutdownStatus in interface RouterThrottlepublic void setTunnelStatus(String msg)
setTunnelStatus in interface RouterThrottle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||