Not sure I understand why this is necessary--how is set not equivalent AtomicReference.set() and getAndClear() not equivalent to AtomicReference.getAndset(null)?