Code example for AtomicInteger

Methods: decrementAndGet

0
    } 
 
    /* ------------------------------------------------------------ */ 
    public void decRef() 
    { 
        int r=_refs.decrementAndGet();
        if (r == 0 && _pool != null)
        { 
            setAssociated(null); 
            _pool.recycleMessage(this);
        } 
        else if (r < 0)
            throw new IllegalStateException();
    } 
 
    /* ------------------------------------------------------------ */ 
    /* 
     * (non-Javadoc) 
     *  
     * @see java.util.HashMap#entrySet() 
     */