cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/OortLong.java
/**
     * @param expected the expected local value
     * @param newValue the new local value
     * @return whether the operation was successful
     */
@param expected the expected local value
@param newValue the new local value
@return whether the operation was successful
@param expected the expected local value @param newValue the new local value @return whether the operation was successful
public boolean compareAndSet(long expected, long newValue) {
        boolean result = atomic.compareAndSet(expected, newValue);
        if (result) {
            value.setAndShare(newValue, null);
        }
        return result;
    }
public boolean compareAndSet ( long expected , long newValue ) { boolean result = atomic . compareAndSet ( expected , newValue ) ; if ( result ) { value . setAndShare ( newValue , null ) ; } return result ; }
@param expected the expected local value
 @param newValue the new local value
 @return whether the operation was successful
@param expected the expected local value @param newValue the new local value @return whether the operation was successful