Code example for AtomicBoolean

Methods: get, set

0
    public void result(Message response)
    {         
        try 
        { 
            lock.lock();
            if (!done.get())
            { 
                from = response.getFrom();
                result = response.getMessageBody();
                done.set(true);
                condition.signal();
            } 
        } 
        finally 
        { 
            lock.unlock();
        }         
    } 
 
    public boolean isLatencyForSnitch() 
    {