Package org.apache.stratum.jcs.auxiliary.disk

Examples of org.apache.stratum.jcs.auxiliary.disk.PurgatoryElement


    {
        try
        {
            log.debug( "putting in purgatory" );

            PurgatoryElement pe = new PurgatoryElement( ce );
            pe.setSpoolable( true );
            q.addPutEvent( ( ICacheElement ) pe );

            //q.addPutEvent( ce );

            /*
 
View Full Code Here


    /** Description of the Method */
    public Serializable get( Serializable key, boolean container )
    {
        //IDiskElement ide = (IDiskElement)purgatory.get( key );
        PurgatoryElement pe = ( PurgatoryElement ) purgatory.get( key );
        //if ( ide != null ) {
        if ( pe != null )
        {
            purgHits++;

            if ( log.isDebugEnabled() )
            {
                if ( purgHits % 100 == 0 )
                {
                    log.debug( "purgatory hits = " + purgHits );
                }
            }

            pe.setSpoolable( false );

            log.debug( "found in purgatory" );

            if ( container )
            {
                purgatory.remove( key );

                return pe.getCacheElement();
            }
            else
            {
                purgatory.remove( key );

                return ( Serializable ) pe.getCacheElement().getVal();
            }
        }
        try
        {
            return cache.get( key );
View Full Code Here

            return;
        }

        if ( ce instanceof PurgatoryElement )
        {
            PurgatoryElement pe = ( PurgatoryElement ) ce;
            ce = pe.getCacheElement();
            if ( ! pe.isSpoolable() )
            {
                log.debug( "pe is not spoolable" );

                // it has been plucked from purgatory
                return;
View Full Code Here

    {
        try
        {
            log.debug( "putting in purgatory" );

            PurgatoryElement pe = new PurgatoryElement( ce );
            pe.setSpoolable( true );
            q.addPutEvent( ( ICacheElement ) pe );

            //q.addPutEvent( ce );

            /*
 
View Full Code Here

    /** Description of the Method */
    public Serializable get( Serializable key, boolean container )
    {
        //IDiskElement ide = (IDiskElement)purgatory.get( key );
        PurgatoryElement pe = ( PurgatoryElement ) purgatory.get( key );
        //if ( ide != null ) {
        if ( pe != null )
        {
            purgHits++;
            if ( log.isDebugEnabled() )
            {
                if ( purgHits % 100 == 0 )
                {
                    log.debug( "purgatory hits = " + purgHits );
                }
            }

            pe.setSpoolable( false );

            log.debug( "found in purgatory" );

            if ( container )
            {
                purgatory.remove( key );

                return pe.getCacheElement();
            }
            else
            {
                purgatory.remove( key );

                return ( Serializable ) pe.getCacheElement().getVal();
            }
        }
        try
        {
            return cache.get( key );
View Full Code Here

            return;
        }

        if ( ce instanceof PurgatoryElement )
        {
            PurgatoryElement pe = ( PurgatoryElement ) ce;
            ce = pe.getCacheElement();
            if ( ! pe.isSpoolable() )
            {
                log.debug( "pe is not spoolable" );

                // it has been plucked from purgatory
                return;
View Full Code Here

TOP

Related Classes of org.apache.stratum.jcs.auxiliary.disk.PurgatoryElement

Copyright © 2018 www.massapicom. 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.