Service
, TunnelManagerFacade
public class TunnelPoolManager extends java.lang.Object implements TunnelManagerFacade
コンストラクタ | 説明 |
---|---|
TunnelPoolManager(RouterContext ctx) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
boolean |
addAlias(Destination dest,
ClientTunnelSettings settings,
Destination existingClient) |
Add another destination to the same tunnels.
|
(package private) void |
buildComplete(PooledTunnelCreatorConfig cfg) |
queue a recurring test job if appropriate
|
void |
buildTunnels(Destination client,
ClientTunnelSettings settings) |
Used only at session startup.
|
void |
fail(Hash peer) |
Fail all outbound tunnels with this peer as first hop,
and all inbound tunnels with this peer as the last hop,
baecause we can't contact it any more.
|
(package private) BuildExecutor |
getExecutor() |
|
int |
getFreeTunnelCount() |
how many free inbound tunnels do we have available?
|
int |
getInboundBuildQueueSize() |
count how many inbound tunnel requests we have received but not yet processed
|
java.util.Map<Hash,TunnelPool> |
getInboundClientPools() |
for TunnelRenderer in router console
|
int |
getInboundClientTunnelCount() |
how many free inbound client tunnels do we have available?
|
TunnelPool |
getInboundExploratoryPool() |
For TunnelRenderer in router console
|
TunnelPoolSettings |
getInboundSettings() |
exploratory
|
TunnelPoolSettings |
getInboundSettings(Hash client) |
|
long |
getLastParticipatingExpiration() |
When does the last tunnel we are participating in expire?
|
java.util.Map<Hash,TunnelPool> |
getOutboundClientPools() |
for TunnelRenderer in router console
|
int |
getOutboundClientTunnelCount() |
how many outbound client tunnels do we have available?
|
int |
getOutboundClientTunnelCount(Hash destination) |
Use to verify a tunnel pool is alive
|
TunnelPool |
getOutboundExploratoryPool() |
For TunnelRenderer in router console
|
TunnelPoolSettings |
getOutboundSettings() |
exploratory
|
TunnelPoolSettings |
getOutboundSettings(Hash client) |
|
int |
getOutboundTunnelCount() |
how many outbound tunnels do we have available?
|
int |
getParticipatingCount() |
how many tunnels are we participating in?
|
double |
getShareRatio() |
|
TunnelInfo |
getTunnelInfo(TunnelId id) |
推奨されていません。
unused
|
(package private) boolean |
isShutdown() |
|
boolean |
isValidTunnel(Hash client,
TunnelInfo tunnel) |
Is a tunnel a valid member of the pool?
|
void |
listPools(java.util.List<TunnelPool> out) |
list of TunnelPool instances currently in play
|
void |
removeAlias(Destination dest) |
Remove a destination for the same tunnels as another.
|
void |
removeTunnels(Hash destination) |
This will be called twice, once by the inbound and once by the outbound pool.
|
void |
renderStatusHTML(java.io.Writer out) |
推奨されていません。
moved to routerconsole
|
void |
restart() |
Perform a soft restart.
|
TunnelInfo |
selectInboundExploratoryTunnel(Hash closestTo) |
Pick the inbound exploratory tunnel with the gateway closest to the given hash.
|
TunnelInfo |
selectInboundTunnel() |
Pick a random inbound exploratory tunnel.
|
TunnelInfo |
selectInboundTunnel(Hash destination) |
Pick a random inbound tunnel from the given destination's pool.
|
TunnelInfo |
selectInboundTunnel(Hash destination,
Hash closestTo) |
Pick the inbound tunnel with the gateway closest to the given hash
from the given destination's pool.
|
TunnelInfo |
selectOutboundExploratoryTunnel(Hash closestTo) |
Pick the outbound exploratory tunnel with the endpoint closest to the given hash.
|
TunnelInfo |
selectOutboundTunnel() |
Pick a random outbound exploratory tunnel.
|
TunnelInfo |
selectOutboundTunnel(Hash destination) |
Pick a random outbound tunnel from the given destination's pool.
|
TunnelInfo |
selectOutboundTunnel(Hash destination,
Hash closestTo) |
Pick the outbound tunnel with the endpoint closest to the given hash
from the given destination's pool.
|
java.util.Set<Hash> |
selectPeersInTooManyTunnels() |
For reliability reasons, don't allow a peer in more than x% of
client and exploratory tunnels.
|
void |
setInboundSettings(Hash client,
TunnelPoolSettings settings) |
|
void |
setInboundSettings(TunnelPoolSettings settings) |
exploratory
|
void |
setOutboundSettings(Hash client,
TunnelPoolSettings settings) |
|
void |
setOutboundSettings(TunnelPoolSettings settings) |
exploratory
|
void |
shutdown() |
Cannot be restarted
|
void |
startup() |
Instruct the service that it should start normal operation.
|
(package private) void |
tunnelFailed() |
public TunnelPoolManager(RouterContext ctx)
public TunnelInfo selectInboundTunnel()
selectInboundTunnel
インタフェース内 TunnelManagerFacade
public TunnelInfo selectInboundTunnel(Hash destination)
selectInboundTunnel
インタフェース内 TunnelManagerFacade
destination
- if null, returns inbound exploratory tunnelpublic TunnelInfo selectOutboundTunnel()
selectOutboundTunnel
インタフェース内 TunnelManagerFacade
public TunnelInfo selectOutboundTunnel(Hash destination)
selectOutboundTunnel
インタフェース内 TunnelManagerFacade
destination
- if null, returns outbound exploratory tunnelpublic TunnelInfo selectInboundExploratoryTunnel(Hash closestTo)
selectInboundExploratoryTunnel
インタフェース内 TunnelManagerFacade
closestTo
- non-nullpublic TunnelInfo selectInboundTunnel(Hash destination, Hash closestTo)
selectInboundTunnel
インタフェース内 TunnelManagerFacade
destination
- if null, returns inbound exploratory tunnelclosestTo
- non-nullpublic TunnelInfo selectOutboundExploratoryTunnel(Hash closestTo)
selectOutboundExploratoryTunnel
インタフェース内 TunnelManagerFacade
closestTo
- non-nullpublic TunnelInfo selectOutboundTunnel(Hash destination, Hash closestTo)
selectOutboundTunnel
インタフェース内 TunnelManagerFacade
destination
- if null, returns outbound exploratory tunnelclosestTo
- non-null@Deprecated public TunnelInfo getTunnelInfo(TunnelId id)
getTunnelInfo
インタフェース内 TunnelManagerFacade
id
- the tunnelId as seen at the gatewaypublic int getFreeTunnelCount()
TunnelManagerFacade
getFreeTunnelCount
インタフェース内 TunnelManagerFacade
public int getOutboundTunnelCount()
TunnelManagerFacade
getOutboundTunnelCount
インタフェース内 TunnelManagerFacade
public int getInboundClientTunnelCount()
TunnelManagerFacade
getInboundClientTunnelCount
インタフェース内 TunnelManagerFacade
public int getOutboundClientTunnelCount()
TunnelManagerFacade
getOutboundClientTunnelCount
インタフェース内 TunnelManagerFacade
public int getOutboundClientTunnelCount(Hash destination)
getOutboundClientTunnelCount
インタフェース内 TunnelManagerFacade
public int getParticipatingCount()
TunnelManagerFacade
getParticipatingCount
インタフェース内 TunnelManagerFacade
public long getLastParticipatingExpiration()
TunnelManagerFacade
getLastParticipatingExpiration
インタフェース内 TunnelManagerFacade
public double getShareRatio()
getShareRatio
インタフェース内 TunnelManagerFacade
public boolean isValidTunnel(Hash client, TunnelInfo tunnel)
TunnelManagerFacade
isValidTunnel
インタフェース内 TunnelManagerFacade
public TunnelPoolSettings getInboundSettings()
getInboundSettings
インタフェース内 TunnelManagerFacade
public TunnelPoolSettings getOutboundSettings()
getOutboundSettings
インタフェース内 TunnelManagerFacade
public void setInboundSettings(TunnelPoolSettings settings)
setInboundSettings
インタフェース内 TunnelManagerFacade
public void setOutboundSettings(TunnelPoolSettings settings)
setOutboundSettings
インタフェース内 TunnelManagerFacade
public TunnelPoolSettings getInboundSettings(Hash client)
getInboundSettings
インタフェース内 TunnelManagerFacade
public TunnelPoolSettings getOutboundSettings(Hash client)
getOutboundSettings
インタフェース内 TunnelManagerFacade
public void setInboundSettings(Hash client, TunnelPoolSettings settings)
setInboundSettings
インタフェース内 TunnelManagerFacade
public void setOutboundSettings(Hash client, TunnelPoolSettings settings)
setOutboundSettings
インタフェース内 TunnelManagerFacade
public void restart()
Service
public void buildTunnels(Destination client, ClientTunnelSettings settings)
buildTunnels
インタフェース内 TunnelManagerFacade
public boolean addAlias(Destination dest, ClientTunnelSettings settings, Destination existingClient)
addAlias
インタフェース内 TunnelManagerFacade
java.lang.IllegalArgumentException
- if notpublic void removeAlias(Destination dest)
removeAlias
インタフェース内 TunnelManagerFacade
public void removeTunnels(Hash destination)
void buildComplete(PooledTunnelCreatorConfig cfg)
public void startup()
Service
public void listPools(java.util.List<TunnelPool> out)
listPools
インタフェース内 TunnelManagerFacade
void tunnelFailed()
BuildExecutor getExecutor()
boolean isShutdown()
public int getInboundBuildQueueSize()
TunnelManagerFacade
getInboundBuildQueueSize
インタフェース内 TunnelManagerFacade
@Deprecated public void renderStatusHTML(java.io.Writer out) throws java.io.IOException
renderStatusHTML
インタフェース内 Service
java.io.IOException
public java.util.Set<Hash> selectPeersInTooManyTunnels()
selectPeersInTooManyTunnels
インタフェース内 TunnelManagerFacade
public java.util.Map<Hash,TunnelPool> getInboundClientPools()
getInboundClientPools
インタフェース内 TunnelManagerFacade
public java.util.Map<Hash,TunnelPool> getOutboundClientPools()
getOutboundClientPools
インタフェース内 TunnelManagerFacade
public TunnelPool getInboundExploratoryPool()
getInboundExploratoryPool
インタフェース内 TunnelManagerFacade
public TunnelPool getOutboundExploratoryPool()
getOutboundExploratoryPool
インタフェース内 TunnelManagerFacade
public void fail(Hash peer)
fail
インタフェース内 TunnelManagerFacade