Code example for AtomicBoolean

Methods: getAndSet

0
        return _message;
    } 
 
    public void release() 
    { 
        if(!_released.getAndSet(true))
        { 
            if(_message != null)
            { 
                onRelease(_message);
            } 
        } 
    } 
 
}