Package edu.brown.hstore.util.ArrayCache

Examples of edu.brown.hstore.util.ArrayCache.LongArrayCache


   
    /**
     * testLongArrayCache
     */
    public void testLongArrayCache() throws Exception {
        LongArrayCache cache = new LongArrayCache(INITIAL_SIZE);
        for (int i = 1; i < MAX_SIZE; i++) {
            long arr[] = cache.getArray(i);
            assertNotNull(arr);
            assertEquals(i, arr.length);
            Arrays.fill(arr, i);
        } // FOR
       
        // Make sure that we are reusing the arrays
        for (int i = 1; i < MAX_SIZE; i++) {
            long arr[] = cache.getArray(i);
            assertNotNull(arr);
            assertEquals(i, arr.length);
            for (int ii = 0; ii < arr.length; ii++)
                assertEquals(i, arr[ii]);
        } // FOR
View Full Code Here

TOP

Related Classes of edu.brown.hstore.util.ArrayCache.LongArrayCache

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.