Package org.apache.jcs.auxiliary.disk

Examples of org.apache.jcs.auxiliary.disk.DiskTestObject


                // 1/2 upper to upperKB-4 KB
                int kiloBytes = Math.max( upperKB / 2, random.nextInt( upperKB ) );
                int bytes = ( kiloBytes ) * 1024;
                totalSize += bytes;
                totalPut++;
                DiskTestObject object = new DiskTestObject( new Integer( i ), new byte[bytes] );
                jcs.put( String.valueOf( totalPut ), object );
            }

            // remove half of those inserted the previous run
            if ( runCount > 1 )
View Full Code Here


        ICacheElement[] elements = new ICacheElement[numToCreate];
        for ( int i = 0; i < numToCreate; i++ )
        {
            // 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

        for ( int i = 0; i < numToCreate; i++ )
        {
            int bytes = random.nextInt( 20 );
            // 4-24 KB
            int size = ( bytes + 4 ) * 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

                // 1/2 upper to upperKB-4 KB
                int kiloBytes = Math.max( upperKB / 2, random.nextInt( upperKB ) );
                int bytes = ( kiloBytes ) * 1024;
                totalSize += bytes;
                totalPut++;
                DiskTestObject object = new DiskTestObject( new Integer( i ), new byte[bytes] );
                jcs.put( String.valueOf( totalPut ), object );
            }

            // get half of those inserted the previous run
            if ( runCount > 1 )
View Full Code Here

TOP

Related Classes of org.apache.jcs.auxiliary.disk.DiskTestObject

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.