@@ -0,0 +1,1864 @@
+package miner.proxy;%0A%0Aimport redis.clients.jedis.Jedis;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Iterator;%0Aimport java.util.Map;%0Aimport java.util.Set;%0A%0A/**%0A * Created by white on 15/10/11.%0A */%0Apublic class ProxyMonitor %7B%0A    private Jedis jedis;%0A%0A    public ProxyMonitor(String ip_address, int port, String password)%7B%0A        jedis=new RedisUtil(ip_address, port, password).get_jedis_instance();%0A    %7D%0A%0A    public ProxyMonitor(RedisUtil ru)%7B%0A        jedis=ru.get_jedis_instance();%0A    %7D%0A%0A    /* %E4%B8%A4%E4%B8%AA%E5%9F%BA%E6%9C%AC%E6%96%B9%E6%B3%95 */%0A    public int get_set_count(String set_name)%7B%0A        return jedis.smembers(set_name).size();%0A    %7D%0A%0A    public Set%3CString%3E get_set(String set_name)%7B%0A        return jedis.smembers(set_name);%0A    %7D%0A%0A    /* %E5%AF%B9%E6%80%BBIP%E6%B1%A0%E7%9A%84%E8%AE%BF%E9%97%AE */%0A    public int get_main_proxy_count()%7B%0A        return this.get_set_count(%22proxy_pool%22);%0A    %7D%0A%0A    public Set%3CString%3E get_main_proxy_set()%7B%0A        return this.get_set(%22proxy_pool%22);%0A    %7D%0A%0A    /* %E5%AF%B9%E5%90%84%E4%B8%AAworkspace%E7%9A%84IP%E6%B1%A0%E7%9A%84%E8%AE%BF%E9%97%AE*/%0A    public int get_workspace_pool_count()%7B%0A        return this.get_set_count(%22workspace_pool%22);%0A    %7D%0A%0A    public Set%3CString%3E get_workspace_pool_set()%7B%0A        return this.get_set(%22workspace_pool%22);%0A    %7D%0A%0A    public String get_single_workspace_proxy_count(String workspace_name)%7B%0A        int white_size=jedis.smembers(workspace_name+%22_white_set%22).size();%0A        int black_size=jedis.smembers(workspace_name+%22_black_set%22).size();%0A        return white_size+%22_%22+black_size;%0A    %7D%0A%0A    public Map%3CString,String%3E get_workspaces_proxy_count()%7B%0A        Set%3CString%3E workspace_names=this.get_workspace_pool_set();%0A        Map%3CString,String%3E return_map=new HashMap%3CString,String%3E();%0A        Iterator%3CString%3E it=workspace_names.iterator();%0A        while(it.hasNext())%7B%0A            String name=it.next();%0A            return_map.put(name,this.get_single_workspace_proxy_count(name));%0A        %7D%0A        return return_map;%0A    %7D%0A%0A%7D%0A

add ProxyMonitor.java