package com.fdkankan.download.bean;

import cn.hutool.core.collection.ConcurrentHashSet;

/**
 * <p>
 * TODO
 * </p>
 *
 * @author dengsixing
 * @since 2022/3/29
 **/
public class CurrentDownloadNumUtil {

    /**
     * 正在下载的场景码
     */
    private static ConcurrentHashSet<String> downLoadingNumSet = new ConcurrentHashSet<>();

    public static void addSceneNum(String num){
        downLoadingNumSet.add(num);
    }

    public static boolean containSceneNum(String num){
        return downLoadingNumSet.contains(num);
    }

    public static void removeSceneNum(String num){
        downLoadingNumSet.remove(num);
    }

    public static int cntDownloadingLocal(){
        return downLoadingNumSet.size();
    }

}
