public class AliasedTunnelPool extends TunnelPool
_alive, _context, _log
コンストラクタ | 説明 |
---|---|
AliasedTunnelPool(RouterContext ctx,
TunnelPoolManager mgr,
TunnelPoolSettings settings,
TunnelPool aliasOf) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
(package private) void |
addTunnel(TunnelInfo info) |
Add to the pool.
|
(package private) void |
buildComplete(PooledTunnelCreatorConfig cfg) |
Remove from the _inprogress list
|
(package private) boolean |
buildFallback() |
|
(package private) PooledTunnelCreatorConfig |
configureNewTunnel() |
|
(package private) int |
countHowManyToBuild() |
Gather the data to see how many tunnels to build, and then actually compute that value (delegated to
the countHowManyToBuild function below)
|
long |
getLifetimeProcessed() |
|
TunnelInfo |
getTunnel(TunnelId gatewayId) |
|
boolean |
isAlive() |
Is this pool running AND either exploratory, or tracked by the client manager?
A pool will be alive but not tracked after the client manager removes it
but before all the tunnels have expired.
|
java.util.List<PooledTunnelCreatorConfig> |
listPending() |
list of tunnelInfo instances of tunnels currently being built
|
java.util.List<TunnelInfo> |
listTunnels() |
Return a list of tunnels in the pool
|
protected LeaseSet |
locked_buildNewLeaseSet() |
Build a leaseSet with the required tunnels that aren't about to expire.
|
(package private) boolean |
needFallback() |
Do we really need more fallbacks?
Used to prevent a zillion of them
|
(package private) void |
refreshLeaseSet() |
noop for outbound and exploratory
|
(package private) void |
removeTunnel(TunnelInfo info) |
Remove from the pool.
|
(package private) TunnelInfo |
selectTunnel() |
Pull a random tunnel out of the pool.
|
(package private) TunnelInfo |
selectTunnel(Hash closestTo) |
Return the tunnel from the pool that is XOR-closet to the target.
|
(package private) void |
shutdown() |
|
int |
size() |
duplicate of getTunnelCount(), let's pick one
|
(package private) void |
startup() |
Warning, this may be called more than once
(without an intervening shutdown()) if the
tunnel is stopped and then restarted by the client manager with the same
Destination (i.e.
|
java.lang.String |
toString() |
|
(package private) void |
tunnelFailed(TunnelInfo cfg) |
Remove the tunnel and blame all the peers (not necessarily equally).
|
(package private) void |
tunnelFailed(TunnelInfo cfg,
Hash blamePeer) |
Remove the tunnel and blame only one peer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSettings, getTunnelCount, setSettings
AliasedTunnelPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPoolSettings settings, TunnelPool aliasOf)
void startup()
TunnelPool
startup
クラス内 TunnelPool
void shutdown()
shutdown
クラス内 TunnelPool
TunnelInfo selectTunnel()
TunnelPool
selectTunnel
クラス内 TunnelPool
TunnelInfo selectTunnel(Hash closestTo)
TunnelPool
selectTunnel
クラス内 TunnelPool
public TunnelInfo getTunnel(TunnelId gatewayId)
getTunnel
クラス内 TunnelPool
public java.util.List<TunnelInfo> listTunnels()
TunnelPool
listTunnels
クラス内 TunnelPool
boolean needFallback()
TunnelPool
needFallback
クラス内 TunnelPool
public java.util.List<PooledTunnelCreatorConfig> listPending()
TunnelPool
listPending
クラス内 TunnelPool
public boolean isAlive()
TunnelPool
isAlive
クラス内 TunnelPool
public int size()
TunnelPool
size
クラス内 TunnelPool
void addTunnel(TunnelInfo info)
TunnelPool
addTunnel
クラス内 TunnelPool
void removeTunnel(TunnelInfo info)
TunnelPool
removeTunnel
クラス内 TunnelPool
void tunnelFailed(TunnelInfo cfg)
TunnelPool
tunnelFailed
クラス内 TunnelPool
void tunnelFailed(TunnelInfo cfg, Hash blamePeer)
TunnelPool
tunnelFailed
クラス内 TunnelPool
void refreshLeaseSet()
TunnelPool
refreshLeaseSet
クラス内 TunnelPool
boolean buildFallback()
buildFallback
クラス内 TunnelPool
protected LeaseSet locked_buildNewLeaseSet()
TunnelPool
locked_buildNewLeaseSet
クラス内 TunnelPool
public long getLifetimeProcessed()
getLifetimeProcessed
クラス内 TunnelPool
int countHowManyToBuild()
TunnelPool
countHowManyToBuild
クラス内 TunnelPool
PooledTunnelCreatorConfig configureNewTunnel()
configureNewTunnel
クラス内 TunnelPool
void buildComplete(PooledTunnelCreatorConfig cfg)
TunnelPool
buildComplete
クラス内 TunnelPool
public java.lang.String toString()
toString
クラス内 TunnelPool