Is there any difference between a volatile Object reference and AtomicReference in case I would just use get() and set()-methods from AtomicReference?
Short answer is No:
From the java.util.concurrent.atomic package doc:
The memory effects for accesses and updates of atomics generally follow the rules for volatiles:
* get has the memory effects of reading a volatile variable.
* set has the memory effects of writing (assigning) a volatile variable.
BTW the doc for the package is very good and everything is explained...
-Patrick
No, there is not.
The additional power provided by AtomicReference is the compareAndSet() method and friends. If you do not need those methods, a volatile reference provides the same semantics as AtomicReference.set() and .get().
AtomicReference provides additional functionality which a plain volatile variable does not provide. As you have read API you will know this, but it also provides a lock which can be useful for some operations.
However, unless you need this additional functionality I suggest you use a plain volatile field.