Examples of ICacheStats


Examples of org.apache.jcs.engine.stats.behavior.ICacheStats

     * <p>
     * @return Statistics and Info on the Region.
     */
    public ICacheStats getStatistics()
    {
        ICacheStats stats = new CacheStats();
        stats.setRegionName( this.getCacheName() );

        // store the composite cache stats first
        IStatElement[] elems = new StatElement[2];
        elems[0] = new StatElement();
        elems[0].setName( "HitCountRam" );
        elems[0].setData( "" + getHitCountRam() );

        elems[1] = new StatElement();
        elems[1].setName( "HitCountAux" );
        elems[1].setData( "" + getHitCountAux() );

        // store these local stats
        stats.setStatElements( elems );

        // memory + aux, memory is not considered an auxiliary internally
        int total = auxCaches.length + 1;
        IStats[] auxStats = new Stats[total];

        auxStats[0] = getMemoryCache().getStatistics();

        for ( int i = 0; i < auxCaches.length; i++ )
        {
            AuxiliaryCache aux = auxCaches[i];
            auxStats[i + 1] = aux.getStatistics();
        }

        // sore the auxiliary stats
        stats.setAuxiliaryCacheStats( auxStats );

        return stats;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.