Refactor SimpleAtomicLong to remove duplicate code.