All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pamirs.pradar.LoadMsg Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.pamirs.pradar;

import java.util.concurrent.atomic.AtomicBoolean;

/**
 * @author fabing.zhaofb
 */
public abstract class LoadMsg {
    static volatile AtomicBoolean isLoadFilter = new AtomicBoolean(false);

    public static boolean isLoadFilter() {
        return isLoadFilter.get();
    }

    /**
     * 尝试将加载Filter状态置成已加载
     *
     * @return 返回设置是否成功,如果成功返回true,如果设置失败,则代表已经加载过相关的Filter,则返回false
     */
    public static boolean trySetFilterLoad() {
        return isLoadFilter.compareAndSet(false, true);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy