Package krati.store

Examples of krati.store.DynamicDataArray


*/
public class TestDynamicDataArrayApi extends AbstractTestArrayStoreApi {

    @Override
    protected ArrayStore createStore(File homeDir) throws Exception {
        return new DynamicDataArray(
                _rand.nextInt(1 << 20), /* length */
                100,                    /* batchSize */
                5,                      /* numSyncBatches */
                homeDir,
                new MappedSegmentFactory(),
View Full Code Here


     * @param config - ArrayStore configuration
     * @return a dynamic ArrayStore with growing capacity as needed.
     * @throws Exception if the store cannot be created.
     */
    public static ArrayStore createDynamicArrayStore(StoreConfig config) throws Exception {
        return new DynamicDataArray(config);
    }
View Full Code Here

            int batchSize,
            int numSyncBatches,
            int segmentFileSizeMB,
            SegmentFactory segmentFactory,
            double segmentCompactFactor) throws Exception {
        return new DynamicDataArray(
                initialLength,
                batchSize,
                numSyncBatches,
                homeDir,
                segmentFactory,
View Full Code Here

    @Override
    protected AbstractDataArray createDataArray(File homeDir) throws Exception {
        int initialLength;
        initialLength = Math.max(_idCount, 1 << DynamicConstants.SUB_ARRAY_BITS);
       
        DynamicDataArray dynArray =
            new DynamicDataArray(initialLength,
                                 homeDir,
                                 createSegmentFactory(),
                                 _segFileSizeMB);
       
        dynArray.set(initialLength, null, System.currentTimeMillis());
       
        if(initialLength < (1 << 20)) {
            dynArray.set(initialLength * 2, null, System.currentTimeMillis());
        }
       
        return dynArray;
    }
View Full Code Here

TOP

Related Classes of krati.store.DynamicDataArray

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.