What really is Atomic? since I have to choose some language to frame my question more clearly I would choose Java. I know that atomic means do everything or just rollback/do nothing. so say I have the following
public class Myclass {
    private boolean progress;
    public void setProgress(boolean progress) {
        this.progress = progress;
    }
    public boolean getProgress() {
       return progress;
    }
}
Now which of the following are thread-safe or atomic or both ? please treat each new line as a separate piece of code
     -------------------
     getProgress(); // 
     ------------------
     ----------------------
     setProgress(true); //
     ----------------------
     -------------------
     getProgress()
     setProgress();
     -------------------
     --------------------
     setProgress();
     getProgress();
     --------------------
Which of these cases would make sense to use AtomicReference in java?