com.pamirs.pradar.LoadMsg Maven / Gradle / Ivy
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);
}
}