Package org.apache.jcs

Examples of org.apache.jcs.JCS.clear()


        // I discovered it and removed it.
        // Thread.sleep( 500 );

        System.out.println( jcs.getStats() );

        jcs.clear();

        for ( int i = 0; i <= items; i++ )
        {
            String value = (String) jcs.get( i + ":key" );
View Full Code Here


        // a db thread could be updating the disk when
        // Thread.sleep( 500 );

        System.out.println( jcs.getStats() );

        jcs.clear();

        for ( int i = 0; i <= items; i++ )
        {
            String value = (String) jcs.get( i + ":key" );
View Full Code Here

        System.out.println( LOG_DIVIDER );
        System.out.println( "After getting " + numToGet );
        System.out.println( "Elapsed " + timer.getElapsedTimeString() );
        logMemoryUsage();

        jcs.clear();
        Thread.sleep( 3000 );
        System.out.println( LOG_DIVIDER );
        System.out.println( "Start putting" );

        long totalSize = 0;
View Full Code Here

    {
        String regionName = "myRegion";
        JCS cache = JCS.getInstance( regionName );

        // clear the region
        cache.clear();

        String key = "myKey";
        cache.put( key, "value" );

        JCSAdminBean admin = new JCSAdminBean();
View Full Code Here

        String regionName = "myRegion";
        JCS cache = JCS.getInstance( regionName );

        // clear the region
        cache.clear();
        admin.clearRegion( regionName );

        String key = "myKey";
        cache.put( key, "value" );
View Full Code Here

        System.out.println( LOG_DIVIDER );
        System.out.println( "After getting " + numToGet );
        System.out.println( "Elapsed " + timer.getElapsedTimeString() );
        logMemoryUsage();

        jcs.clear();
        Thread.sleep( 3000 );
        System.out.println( LOG_DIVIDER );
        System.out.println( "Start putting" );

        long totalSize = 0;
View Full Code Here

        System.out.println( "--------------------------" );
        long initialMemory = measureMemoryUse();
        System.out.println( "Before getting JCS: " + initialMemory );

        JCS jcs = JCS.getInstance( region );
        jcs.clear();

        try
        {
            ElapsedTimer timer = new ElapsedTimer();
            System.out.println( "Start: " + measureMemoryUse() );
View Full Code Here

        for ( int i = 0; i < items; i++ )
        {
            cache.put( i + ":key", "myregion" + " data " + i );
        }

        cache.clear();

        // Test that first items are not in the cache
        for ( int i = max; i >= 0; i-- )
        {
            String value = (String) cache.get( i + ":key" );
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.