Package krati.store

Examples of krati.store.ArrayStore.clear()


                segmentFactory);
       
        assertEquals(length, store.length());
        assertEquals(length, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        // Smaller length has no impact
        int smallerLength = length - 500;
        store = StoreFactory.createStaticArrayStore(
View Full Code Here


                segmentFactory);
       
        assertEquals(length, store.length());
        assertEquals(length, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        // Larger length has no impact
        int largerLength = length + 500;
        store = StoreFactory.createStaticArrayStore(
View Full Code Here

                segmentCompactFactor);
       
        assertEquals(length, store.length());
        assertEquals(length, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        // Use StoreConfig
        StoreConfig config = new StoreConfig(homeDir, length);
        config.setBatchSize(batchSize);
View Full Code Here

        store = StoreFactory.createStaticArrayStore(config);
       
        assertEquals(length, store.length());
        assertEquals(length, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        FileUtils.deleteDirectory(homeDir);
    }
   
View Full Code Here

                segmentFactory);
       
        assertEquals(initialLength, store.length());
        assertEquals(initialLength, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        // Smaller length has no impact
        int smallerLength = initialLength - 500;
        store = StoreFactory.createDynamicArrayStore(
View Full Code Here

                segmentFactory);
       
        assertEquals(initialLength, store.length());
        assertEquals(initialLength, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        // Larger length caused the store to grow capacity
        int largerLength = initialLength + 500;
        int expectedLength = initialLength + DynamicConstants.SUB_ARRAY_SIZE;
View Full Code Here

                segmentCompactFactor);
       
        assertEquals(expectedLength, store.length());
        assertEquals(expectedLength, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        // Use StoreConfig
        StoreConfig config = new StoreConfig(homeDir, initialLength);
        config.setBatchSize(batchSize);
View Full Code Here

        store = StoreFactory.createDynamicArrayStore(config);
       
        assertEquals(expectedLength, store.length());
        assertEquals(expectedLength, store.capacity());
        assertEquals(0, store.getIndexStart());
        store.clear();
        store.close();
       
        FileUtils.deleteDirectory(homeDir);
    }
   
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.