Code example for AtomicBoolean

0
 * @since 2011-5-27 ÏÂÎç03:21:25 
 */ 
 
abstract public class AbstractProber implements Prober { 
    protected final Log logger = LogFactory.getLog(this.getClass());
    private volatile AtomicBoolean isProbeStarted = new AtomicBoolean(false);
 
    protected final CoreManager coreManager;
 
 
    public AbstractProber(CoreManager coreManager) {
        this.coreManager = coreManager;
    } 
 
 
    public void prob() throws InterruptedException { 
        // ±ÜÃâ±»Îóµ÷Óöà´Î 
        if (this.isProbeStarted.get() == false) {
            this.doProb();
            this.isProbeStarted.set(true);
        }