src/java/org/apache/cassandra/cache/FreeableMemory.java
/**
     * @return true if we succeed in referencing before the reference count reaches zero.
     * (A FreeableMemory object is created with a reference count of one.)
     */
@return true if we succeed in referencing before the reference count reaches zero.
(A FreeableMemory object is created with a reference count of one.)
@return true if we succeed in referencing before the reference count reaches zero . ( A FreeableMemory object is created with a reference count of one . )
public boolean reference()
    {
        while (true)
        {
            int n = references.get();
            if (n <= 0)
                return false;
            if (references.compareAndSet(n, n + 1))
                return true;
        }
    }
public boolean reference ( ) { while ( true ) { int n = references . get ( ) ; if ( n <= 0 ) return false ; if ( references . compareAndSet ( n , n + 1 ) ) return true ; } }
@return true if we succeed in referencing before the reference count reaches zero.
@return true if we succeed in referencing before the reference count reaches zero .