Methods Summary |
---|
public int | addWarningForIp(java.lang.String ip)
try{
bad_ip_map_mon.enter();
BadIpImpl bad_ip = (BadIpImpl)bad_ip_map.get( ip );
if ( bad_ip == null ){
bad_ip = new BadIpImpl(ip);
bad_ip_map.put( ip, bad_ip );
}
return( bad_ip.incrementWarnings());
}finally{
bad_ip_map_mon.exit();
}
|
public void | clearBadIps()
try{
bad_ip_map_mon.enter();
bad_ip_map.clear();
}finally{
bad_ip_map_mon.exit();
}
|
public org.gudy.azureus2.core3.ipfilter.BadIp[] | getBadIps()
try{
bad_ip_map_mon.enter();
BadIp[] res = new BadIp[bad_ip_map.size()];
bad_ip_map.values().toArray( res );
return( res );
}finally{
bad_ip_map_mon.exit();
}
|
public static org.gudy.azureus2.core3.ipfilter.BadIps | getInstance()
try{
class_mon.enter();
if( instance == null ){
instance = new BadIpsImpl();
}
return( instance );
}finally{
class_mon.exit();
}
|
public int | getNbBadIps()
return( bad_ip_map.size());
|
public int | getNbWarningForIp(java.lang.String ip)
try{
bad_ip_map_mon.enter();
BadIpImpl bad_ip = (BadIpImpl) bad_ip_map.get(ip);
if(bad_ip == null) {
return 0;
}else{
return bad_ip.getNumberOfWarnings();
}
}finally{
bad_ip_map_mon.exit();
}
|