public class RouterThrottleImpl extends Object implements RouterThrottle
Modifier and Type | Field and Description |
---|---|
protected RouterContext |
_context |
static int |
DEFAULT_MAX_TUNNELS |
(package private) static int |
DEFAULT_MESSAGES_PER_TUNNEL_ESTIMATE |
static long |
DEFAULT_REJECT_STARTUP_TIME |
static String |
PROP_MAX_TUNNELS |
static String |
PROP_REJECT_STARTUP_TIME |
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?
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() |
String |
getLocalizedTunnelStatus()
getTunnelStatus(), translated if available.
|
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) |
protected final RouterContext _context
public static final String PROP_MAX_TUNNELS
public static final int DEFAULT_MAX_TUNNELS
public static final long DEFAULT_REJECT_STARTUP_TIME
public static final String PROP_REJECT_STARTUP_TIME
public static final int TUNNEL_ACCEPT
static final int DEFAULT_MESSAGES_PER_TUNNEL_ESTIMATE
public RouterThrottleImpl(RouterContext context)
public boolean acceptNetworkMessage()
acceptNetworkMessage
in interface RouterThrottle
@Deprecated 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 String getTunnelStatus()
RouterThrottle
getTunnelStatus
in interface RouterThrottle
public String getLocalizedTunnelStatus()
getLocalizedTunnelStatus
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