public class PooledTunnelCreatorConfig extends TunnelCreatorConfig
_context, MAX_CONSECUTIVE_TEST_FAILURES, REPLY_IV_LENGTH| Constructor and Description |
|---|
PooledTunnelCreatorConfig(RouterContext ctx,
int length,
boolean isInbound,
Hash destination,
TunnelPool pool)
Creates a new instance of PooledTunnelCreatorConfig
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearLastResort()
Clear the last resort status - tunnel has recovered or been replaced.
|
Properties |
getOptions() |
TunnelId |
getPairedGW()
The ID of the gateway of the paired tunnel used to send/receive the build request
|
TunnelPool |
getTunnelPool() |
boolean |
isLastResort()
Check if this tunnel is the last resort (only tunnel in pool).
|
boolean |
isRecentlyActive(long maxIdleMs)
Check if this tunnel has been recently active (used within the last minute
or has processed messages since last check).
|
void |
recordActivity()
Record that this tunnel was selected/used.
|
void |
setLastResort()
Mark this tunnel as the last resort - the only tunnel remaining in the pool.
|
void |
setPairedGW(TunnelId gw)
The ID of the gateway of the paired tunnel used to send/receive the build request
|
void |
testJobSuccessful(int ms)
called from TestJob
|
boolean |
tunnelFailed()
The tunnel failed a test, so (maybe) stop using it
|
void |
tunnelFailedFirstHop()
We failed to contact the first hop for an outbound tunnel,
so immediately stop using it.
|
getAESReplyIV, getAESReplyKey, getBlankHash, getChaChaReplyAD, getChaChaReplyKey, getConfig, getConsecutiveFailures, getDestination, getEndpoint, getExpiration, getFarEnd, getGarlicReplyKeys, getGateway, getLastLatency, getLength, getPeer, getPriority, getProcessedMessagesCount, getReceiveTunnelId, getReplyMessageId, getReplyOrder, getSendTunnelId, getTestStatus, getTunnelFailed, getTunnelFailures, getVerifiedBytesTransferred, incrementProcessedMessages, incrementVerifiedBytesTransferred, isDuplicate, isEC, isInbound, setAESReplyKeys, setBlankHash, setChaChaReplyKeys, setDuplicate, setExpiration, setGarlicReplyKeys, setPeer, setPriority, setReplyMessageId, setReplyOrder, setReused, setTestFailed, setTestStarted, testSuccessful, toString, toStringFull, tunnelFailedCompletely, wasReusedpublic PooledTunnelCreatorConfig(RouterContext ctx, int length, boolean isInbound, Hash destination, TunnelPool pool)
destination - may be nullpool - non-nullpublic void clearLastResort()
public Properties getOptions()
getOptions in class TunnelCreatorConfigpublic TunnelId getPairedGW()
public TunnelPool getTunnelPool()
public boolean isLastResort()
public boolean isRecentlyActive(long maxIdleMs)
maxIdleMs - maximum idle time in millisecondspublic void recordActivity()
public void setLastResort()
public void setPairedGW(TunnelId gw)
gw - for paired inbound, the GW rcv tunnel ID; for paired outbound, the GW send tunnel ID.public void testJobSuccessful(int ms)
public boolean tunnelFailed()
tunnelFailed in class TunnelCreatorConfigpublic void tunnelFailedFirstHop()