Package org.apache.jcs.auxiliary.lateral

Examples of org.apache.jcs.auxiliary.lateral.LateralCacheNoWait


                    // same LateralCacheManager instance are in error.  So we fix them once and for all.
                    for ( Iterator itr2 = mgr.caches.values().iterator(); itr2.hasNext())
                    {
                        if ( itr2.hasNext() )
                        {
                            LateralCacheNoWait c = ( LateralCacheNoWait ) itr2.next();
                            if ( c.getStatus() == CacheConstants.STATUS_ERROR )
                            {
                                log.debug( "found LateralCacheNoWait in error" );

                                LateralCacheRestore repairer = new LateralCacheRestore( mgr );
                                // If we can't fix them, just skip and re-try in the next round.
View Full Code Here


     * @return AuxiliaryCache
     * @param cacheName
     */
    public AuxiliaryCache getCache( String cacheName )
    {
        LateralCacheNoWait lateralNoWait = null;
        synchronized ( this.caches )
        {
            lateralNoWait = (LateralCacheNoWait) this.caches.get( cacheName );
            if ( lateralNoWait == null )
            {
                LateralCacheAttributes attr = (LateralCacheAttributes) lca.copy();
                attr.setCacheName( cacheName );

                LateralCache cache = new LateralCache( attr, this.lateralService, monitor );
                if ( log.isDebugEnabled() )
                {
                    log.debug( "Created cache for noWait, cache [" + cache + "]" );
                }
                lateralNoWait = new LateralCacheNoWait( cache );
                this.caches.put( cacheName, lateralNoWait );

                if ( log.isInfoEnabled() )
                {
                    log.info( "Created LateralCacheNoWait for [" + this.lca + "] LateralCacheNoWait = ["
View Full Code Here

        lac.setTcpServer( "localhost" + ":" + 1111 );

        LateralCache cache = new MockLateralCache( lac );

        // add one
        LateralCacheNoWait noWait = new LateralCacheNoWait( cache );
        lcnwf.addNoWait( noWait );
        assertEquals( "Facade should have 1 no wait", 1, lcnwf.noWaits.length );

        // add another
        LateralCacheNoWait noWait2 = new LateralCacheNoWait( cache );
        lcnwf.addNoWait( noWait2 );
        assertEquals( "Facade should have 2 no waits", 2, lcnwf.noWaits.length );

        // try adding the same one again
        lcnwf.addNoWait( noWait2 );
View Full Code Here

TOP

Related Classes of org.apache.jcs.auxiliary.lateral.LateralCacheNoWait

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.