public boolean compareAndSet ( final long expectedValue , final long updateValue ) { return UnsafeAccess . UNSAFE . compareAndSwapLong ( byteArray , addressOffset , expectedValue , updateValue ) ; }
Compare the current value to expected and if true then set to the update value atomically .