@@ -0,0 +1,2704 @@
+package com.qiniu.android.common;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport java.net.URI;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.concurrent.ConcurrentHashMap;%0A%0A/**%0A * Created by jemy on 17/04/2017.%0A */%0A%0Apublic class ZoneInfo %7B%0A    private static int DOMAIN_FROZEN_SECONDS = 10;%0A    private final int ttl;%0A    //upHost%0A    public final List%3CString%3E upDomainsList;%0A    //upHost -%3E frozenTillTimestamp%0A    public final Map%3CString, Long%3E upDomainsMap;%0A%0A    public ZoneInfo(int ttl, List%3CString%3E upDomainsList, Map%3CString, Long%3E upDomainsMap) %7B%0A        this.ttl = ttl;%0A        this.upDomainsList = upDomainsList;%0A        this.upDomainsMap = upDomainsMap;%0A    %7D%0A%0A    public static ZoneInfo buildFromJson(JSONObject obj) throws JSONException %7B%0A        int ttl = obj.getInt(%22ttl%22);%0A        List%3CString%3E domainsList = new ArrayList%3C%3E();%0A        ConcurrentHashMap%3CString, Long%3E domainsMap = new ConcurrentHashMap%3C%3E();%0A        JSONObject upObj = obj.getJSONObject(%22up%22);%0A%0A        String%5B%5D upDomainTags = new String%5B%5D%7B%22acc%22, %22src%22, %22old_acc%22, %22old_src%22%7D;%0A        for (String tag : upDomainTags) %7B%0A            JSONObject tagRootObj = upObj.getJSONObject(tag);%0A            JSONArray tagMainObj = tagRootObj.getJSONArray(%22main%22);%0A            for (int i = 0; i %3C tagMainObj.length(); i++) %7B%0A                String upDomain = tagMainObj.getString(i);%0A                domainsList.add(upDomain);%0A                domainsMap.put(upDomain, 0L);%0A            %7D%0A%0A            try %7B%0A                JSONArray tagBackupObj = tagRootObj.getJSONArray(%22backup%22);%0A                if (tagBackupObj != null) %7B%0A                    //this backup tag is optional%0A                    for (int i = 0; i %3C tagBackupObj.length(); i++) %7B%0A                        String upHost = tagBackupObj.getString(i);%0A                        domainsList.add(upHost);%0A                        domainsMap.put(upHost, 0L);%0A                    %7D%0A                %7D%0A            %7D catch (JSONException ex) %7B%0A                //some zone has not backup domain, just ignore here%0A            %7D%0A        %7D%0A        return new ZoneInfo(ttl, domainsList, domainsMap);%0A    %7D%0A%0A    public void frozenDomain(String domain) %7B%0A        //frozen for 10 minutes%0A        upDomainsMap.put(domain, System.currentTimeMillis() / 1000 + DOMAIN_FROZEN_SECONDS);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        Map%3CString, Object%3E m = new HashMap%3CString, Object%3E();%0A        m.put(%22ttl%22, this.ttl);%0A        m.put(%22upDomainList%22, this.upDomainsList);%0A        m.put(%22upDomainMap%22, this.upDomainsMap);%0A        return new JSONObject(m).toString();%0A    %7D%0A%7D%0A

add missed file zoneInfo