forked from I2P_Developers/i2p.i2p
- Show yellow star if no outbound tunnels
This commit is contained in:
@@ -37,6 +37,7 @@ class DummyTunnelManagerFacade implements TunnelManagerFacade {
|
||||
public int getInboundClientTunnelCount() { return 0; }
|
||||
public double getShareRatio() { return 0d; }
|
||||
public int getOutboundClientTunnelCount() { return 0; }
|
||||
public int getOutboundClientTunnelCount(Hash destination) { return 0; }
|
||||
public long getLastParticipatingExpiration() { return -1; }
|
||||
public void buildTunnels(Destination client, ClientTunnelSettings settings) {}
|
||||
public TunnelPoolSettings getInboundSettings() { return null; }
|
||||
|
@@ -51,6 +51,8 @@ public interface TunnelManagerFacade extends Service {
|
||||
public int getInboundClientTunnelCount();
|
||||
/** how many outbound client tunnels do we have available? */
|
||||
public int getOutboundClientTunnelCount();
|
||||
/** how many outbound client tunnels in this pool? */
|
||||
public int getOutboundClientTunnelCount(Hash destination);
|
||||
public double getShareRatio();
|
||||
|
||||
/** When does the last tunnel we are participating in expire? */
|
||||
|
@@ -190,6 +190,21 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use to verify a tunnel pool is alive
|
||||
* @since 0.7.11
|
||||
*/
|
||||
public int getOutboundClientTunnelCount(Hash destination) {
|
||||
TunnelPool pool = null;
|
||||
synchronized (_clientOutboundPools) {
|
||||
pool = _clientOutboundPools.get(destination);
|
||||
}
|
||||
if (pool != null)
|
||||
return pool.getTunnelCount();
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getParticipatingCount() { return _context.tunnelDispatcher().getParticipatingCount(); }
|
||||
public long getLastParticipatingExpiration() { return _context.tunnelDispatcher().getLastParticipatingExpiration(); }
|
||||
|
||||
|
Reference in New Issue
Block a user