Examples of IStats


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

     * (non-Javadoc)
     * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatistics()
     */
    public IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "Lateral Cache No Wait" );

        ArrayList elems = new ArrayList();

        // IStatElement se = null;
        // no data gathered here

        // get the stats from the event queue too
        // get as array, convert to list, add list to our outer list
        IStats eqStats = this.q.getStatistics();

        IStatElement[] eqSEs = eqStats.getStatElements();
        List eqL = Arrays.asList( eqSEs );
        elems.addAll( eqL );

        IStatElement se = null;

View Full Code Here

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

     * <p>
     * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatistics()
     */
    public IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "Abstract Disk Cache" );

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        se = new StatElement();
        se.setName( "Purgatory Hits" );
        se.setData( "" + purgHits );
        elems.add( se );

        se = new StatElement();
        se.setName( "Purgatory Size" );
        se.setData( "" + purgatory.size() );
        elems.add( se );

        // get the stats from the event queue too
        // get as array, convert to list, add list to our outer list
        IStats eqStats = this.cacheEventQueue.getStatistics();
        IStatElement[] eqSEs = eqStats.getStatElements();
        List eqL = Arrays.asList( eqSEs );
        elems.addAll( eqL );

        // get an array and put them in the Stats object
        IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
View Full Code Here

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

    /**
     * @return IStats object
     */
    public IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "Remote Cache No Wait" );

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        se = new StatElement();
        se.setName( "Remote Host:Port" );
        se.setData( this.irca.getRemoteHost() + ":" + this.irca.getRemotePort() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Remote Type" );
        se.setData( this.irca.getRemoteTypeName() + "" );
        elems.add( se );

        if ( this.irca.getRemoteType() == IRemoteCacheAttributes.CLUSTER )
        {
            // something cluster specific
        }

        // no data gathered here

        se = new StatElement();
        se.setName( "UsePoolForGet" );
        se.setData( "" + usePoolForGet );
        elems.add( se );

        if ( pool != null )
        {
            se = new StatElement();
            se.setName( "Pool Size" );
            se.setData( "" + pool.getPool().getPoolSize() );
            elems.add( se );

            se = new StatElement();
            se.setName( "Maximum Pool Size" );
            se.setData( "" + pool.getPool().getMaximumPoolSize() );
            elems.add( se );
        }

        if ( remote instanceof ZombieRemoteCacheService )
        {
            se = new StatElement();
            se.setName( "Zombie Queue Size" );
            se.setData( "" + ((ZombieRemoteCacheService)remote).getQueueSize() );
            elems.add( se );
        }

        // get an array and put them in the Stats object
        IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
        stats.setStatElements( ses );

        return stats;
    }
View Full Code Here

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

    /**
     * Extends the parent stats.
     */
    public IStats getStatistics()
    {
        IStats stats = super.getStatistics();
        stats.setTypeName( "JDBC/Abstract Disk Cache" );
        stats.getStatElements();

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        se = new StatElement();
        se.setName( "Update Count" );
        se.setData( "" + updateCount );
        elems.add( se );

        se = new StatElement();
        se.setName( "Get Count" );
        se.setData( "" + getCount );
        elems.add( se );

        se = new StatElement();
        se.setName( "Size" );
        se.setData( "" + getSize() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Active DB Connections" );
        se.setData( "" + poolAccess.getNumActiveInPool() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Idle DB Connections" );
        se.setData( "" + poolAccess.getNumIdleInPool() );
        elems.add( se );

        se = new StatElement();
        se.setName( "DB URL" );
        se.setData( this.jdbcDiskCacheAttributes.getUrl() );
        elems.add( se );

        // get the stats from the event queue too
        // get as array, convert to list, add list to our outer list
        IStatElement[] eqSEs = stats.getStatElements();
        List eqL = Arrays.asList( eqSEs );
        elems.addAll( eqL );

        // get an array and put them in the Stats object
        IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
        stats.setStatElements( ses );

        return stats;
    }
View Full Code Here

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

     * (non-Javadoc)
     * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatistics()
     */
    public IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "Block Disk Cache" );

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        se = new StatElement();
        se.setName( "Is Alive" );
        se.setData( "" + alive );
        elems.add( se );

        se = new StatElement();
        se.setName( "Key Map Size" );
        se.setData( "" + this.keyStore.size() );
        elems.add( se );

        try
        {
            se = new StatElement();
            se.setName( "Data File Length" );
            if ( this.dataFile != null )
            {
                se.setData( "" + this.dataFile.length() );
            }
            else
            {
                se.setData( "-1" );
            }
            elems.add( se );
        }
        catch ( Exception e )
        {
            log.error( e );
        }

        se = new StatElement();
        se.setName( "Block Size Bytes" );
        se.setData( "" + this.dataFile.getBlockSizeBytes() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Number Of Blocks" );
        se.setData( "" + this.dataFile.getNumberOfBlocks() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Average Put Size Bytes" );
        se.setData( "" + this.dataFile.getAveragePutSizeBytes() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Empty Blocks" );
        se.setData( "" + this.dataFile.getEmptyBlocks() );
        elems.add( se );

        // get the stats from the super too
        // get as array, convert to list, add list to our outer list
        IStats sStats = super.getStatistics();
        IStatElement[] sSEs = sStats.getStatElements();
        List sL = Arrays.asList( sSEs );
        elems.addAll( sL );

        // get an array and put them in the Stats object
        IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
View Full Code Here

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

     * (non-Javadoc)
     * @see org.apache.jcs.engine.behavior.ICacheEventQueue#getStatistics()
     */
    public IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "Pooled Cache Event Queue" );

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        se = new StatElement();
        se.setName( "Working" );
        se.setData( "" + this.working );
        elems.add( se );

        se = new StatElement();
        se.setName( "Destroyed" );
        se.setData( "" + this.isAlive() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Empty" );
        se.setData( "" + this.isEmpty() );
        elems.add( se );

        if ( pool.getQueue() != null )
        {
            if ( pool.getQueue() instanceof BoundedBuffer )
            {
                BoundedBuffer bb = (BoundedBuffer) pool.getQueue();
                se = new StatElement();
                se.setName( "Queue Size" );
                se.setData( "" + bb.size() );
                elems.add( se );

                se = new StatElement();
                se.setName( "Queue Capacity" );
                se.setData( "" + bb.capacity() );
                elems.add( se );
            }
        }

        se = new StatElement();
        se.setName( "Pool Size" );
        se.setData( "" + pool.getPool().getPoolSize() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Maximum Pool Size" );
        se.setData( "" + pool.getPool().getMaximumPoolSize() );
        elems.add( se );

        // get an array and put them in the Stats object
        IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[elems.size()] );
        stats.setStatElements( ses );

        return stats;
    }
View Full Code Here

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

     * (non-Javadoc)
     * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatistics()
     */
    public synchronized IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "Indexed Disk Cache" );

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        se = new StatElement();
        se.setName( "Is Alive" );
        se.setData( "" + alive );
        elems.add( se );

        se = new StatElement();
        se.setName( "Key Map Size" );
        if ( this.keyHash != null )
        {
            se.setData( "" + this.keyHash.size() );
        }
        else
        {
            se.setData( "-1" );
        }
        elems.add( se );

        try
        {
            se = new StatElement();
            se.setName( "Data File Length" );
            if ( this.dataFile != null )
            {
                se.setData( "" + this.dataFile.length() );
            }
            else
            {
                se.setData( "-1" );
            }
            elems.add( se );
        }
        catch ( Exception e )
        {
            log.error( e );
        }

        se = new StatElement();
        se.setName( "Hit Count" );
        se.setData( "" + this.hitCount );
        elems.add( se );

        se = new StatElement();
        se.setName( "Bytes Free" );
        se.setData( "" + this.bytesFree );
        elems.add( se );

        se = new StatElement();
        se.setName( "Optimize Operation Count" );
        se.setData( "" + this.removeCount );
        elems.add( se );

        se = new StatElement();
        se.setName( "Times Optimized" );
        se.setData( "" + this.timesOptimized );
        elems.add( se );

        se = new StatElement();
        se.setName( "Recycle Count" );
        se.setData( "" + this.recycleCnt );
        elems.add( se );

        se = new StatElement();
        se.setName( "Recycle Bin Size" );
        se.setData( "" + this.recycle.size() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Startup Size" );
        se.setData( "" + this.startupSize );
        elems.add( se );

        // get the stats from the super too
        // get as array, convert to list, add list to our outer list
        IStats sStats = super.getStatistics();
        IStatElement[] sSEs = sStats.getStatElements();
        List sL = Arrays.asList( sSEs );
        elems.addAll( sL );

        // get an array and put them in the Stats object
        IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
View Full Code Here

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

    private int getListSize()
    {
        final String listSize = "List Size";
        final String lruMemoryCache = "LRU Memory Cache";
        String result = "0";
        IStats istats[] = jcs.getStatistics().getAuxiliaryCacheStats();
        for ( int i = 0; i < istats.length; i++ )
        {
            IStatElement statElements[] = istats[i].getStatElements();
            if ( lruMemoryCache.equals( istats[i].getTypeName() ) )
            {
View Full Code Here

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

     *
     * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatistics()
     */
    public IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "Lateral Cache No Wait Facade" );

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        if ( noWaits != null )
        {
            se = new StatElement();
            se.setName( "Number of No Waits" );
            se.setData( "" + noWaits.length );
            elems.add( se );

            for ( int i = 0; i < noWaits.length; i++ )
            {
                if ( noWaits[i] != null )
                {
                    // get the stats from the super too
                    // get as array, convert to list, add list to our outer list
                    IStats sStats = noWaits[i].getStatistics();
                    IStatElement[] sSEs = sStats.getStatElements();
                    List sL = Arrays.asList( sSEs );
                    elems.addAll( sL );
                }
            }

View Full Code Here

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

    /**
     * @return IStats
     */
    public IStats getStatistics()
    {
        IStats stats = new Stats();
        stats.setTypeName( "LRUMap" );

        ArrayList elems = new ArrayList();

        IStatElement se = null;

        se = new StatElement();
        se.setName( "List Size" );
        se.setData( "" + list.size() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Map Size" );
        se.setData( "" + map.size() );
        elems.add( se );

        se = new StatElement();
        se.setName( "Put Count" );
        se.setData( "" + putCnt );
        elems.add( se );

        se = new StatElement();
        se.setName( "Hit Count" );
        se.setData( "" + hitCnt );
        elems.add( se );

        se = new StatElement();
        se.setName( "Miss Count" );
        se.setData( "" + missCnt );
        elems.add( se );

        // get an array and put them in the Stats object
        IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
        stats.setStatElements( ses );

        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.