Package org.apache.jcs.engine.behavior

Examples of org.apache.jcs.engine.behavior.ICacheElement


        // Add items to cache

        for ( int i = 0; i < items; i++ )
        {
            ICacheElement ice = new CacheElement( cache.getCacheName(), i + ":key", region + " data " + i );
            ice.setElementAttributes( cache.getElementAttributes() );
            lru.update( ice );
        }

        // Test that initial items have been purged
View Full Code Here


        MockAuxCache mock = new MockAuxCache();
        mock.cacheType = AuxiliaryCache.DISK_CACHE;

        cache.setAuxCaches( new AuxiliaryCache[] { mock } );

        ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" );

        // DO WORK
        cache.spoolToDisk( inputElement );

        // VERIFY
View Full Code Here

        MockAuxCache mock = new MockAuxCache();
        mock.cacheType = AuxiliaryCache.DISK_CACHE;

        cache.setAuxCaches( new AuxiliaryCache[] { mock } );

        ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" );

        // DO WORK
        cache.spoolToDisk( inputElement );

        // VERIFY
View Full Code Here

        MockAuxCache mock = new MockAuxCache();
        mock.cacheType = AuxiliaryCache.DISK_CACHE;

        cache.setAuxCaches( new AuxiliaryCache[] { mock } );

        ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" );

        // DO WORK
        cache.updateAuxiliaries( inputElement, true );

        // VERIFY
View Full Code Here

        MockAuxCache mock = new MockAuxCache();
        mock.cacheType = AuxiliaryCache.DISK_CACHE;

        cache.setAuxCaches( new AuxiliaryCache[] { mock } );

        ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" );

        // DO WORK
        cache.updateAuxiliaries( inputElement, false );

        // VERIFY
View Full Code Here

        MockAuxCache mock = new MockAuxCache();
        mock.cacheType = AuxiliaryCache.DISK_CACHE;

        cache.setAuxCaches( new AuxiliaryCache[] { mock } );

        ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" );

        // DO WORK
        cache.updateAuxiliaries( inputElement, true );

        // VERIFY
View Full Code Here

        MockAuxCache mockLateral = new MockAuxCache();
        mockLateral.cacheType = AuxiliaryCache.LATERAL_CACHE;

        cache.setAuxCaches( new AuxiliaryCache[] { mock, mockLateral } );

        ICacheElement inputElement = new CacheElement( "testSpoolAllowed", "key", "value" );

        // DO WORK
        cache.updateAuxiliaries( inputElement, false );

        // VERIFY
View Full Code Here

        List inputItems = new LinkedList();
        int numToPut = 10;

        for ( int i = 0; i < numToPut; i++ )
        {
            ICacheElement element = new CacheElement( cacheName, String.valueOf( i ), new Long( i ) );
            inputItems.add( element );
            server.update( element, 9999 );
        }

        Thread.sleep( 100 );
View Full Code Here

        List inputItems = new LinkedList();
        int numToPut = 10;

        for ( int i = 0; i < numToPut; i++ )
        {
            ICacheElement element = new CacheElement( cacheName, String.valueOf( i ), new Long( i ) );
            inputItems.add( element );
            // update using the cluster listener id
            server.update( element, clusterListener.getListenerId() );
        }
View Full Code Here

        {
            // 24 KB
            int size = bytes * 1024;
            DiskTestObject tile = new DiskTestObject( new Integer( i ), new byte[size] );

            ICacheElement element = new CacheElement( cacheName, tile.id, tile );
            elements[i] = element;
        }
        return elements;
    }
View Full Code Here

TOP

Related Classes of org.apache.jcs.engine.behavior.ICacheElement

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.