Package krati.store

Examples of krati.store.StaticArrayStorePartition


 
  public static <E extends Element> ArrayStoreElement<E> createElementStorePartition(File storeHomeDir, int idStart, int idCount, SegmentFactory segmentFactory, int segmentFileSizeMB, ElementSerializer<E> serializer)
  throws Exception {
    int batchSize = 5000;
    int numSyncBatches = 20;
    ArrayStorePartition p = new StaticArrayStorePartition(idStart, idCount, batchSize, numSyncBatches, storeHomeDir, segmentFactory, segmentFileSizeMB, false);
    return new KratiArrayStoreElement<E>(p, serializer);
  }
View Full Code Here


    @Override
    protected ArrayStore createStore(File homeDir) throws Exception {
        int idStart = _rand.nextInt(100);
        int idCount = _rand.nextInt(100) + 1000;
        return new StaticArrayStorePartition(
                idStart,
                idCount,
                100,                    /* batchSize */
                5,                      /* numSyncBatches */
                homeDir,
View Full Code Here

       
        ArrayStoreFactory storeFactory = new StaticArrayStoreFactory();
        ArrayStore store = storeFactory.create(_config);
        assertEquals(StaticArrayStorePartition.class, store.getClass());
       
        StaticArrayStorePartition p = (StaticArrayStorePartition)store;
        assertEquals(p.capacity(), p.length());
        assertEquals(p.capacity(), store.capacity());
        assertEquals(p.capacity(), _config.getInitialCapacity());
        assertEquals(p.getIndexStart(), ((StorePartitionConfig)_config).getPartitionStart());
       
        store.close();
    }
View Full Code Here

     * @param config - ArrayStorePartition configuration
     * @return A range-based ArrayStorePartition.
     * @throws Exception if the store cannot be created.
     */
    public static ArrayStorePartition createArrayStorePartition(StorePartitionConfig config) throws Exception {
        return new StaticArrayStorePartition(config);
    }
View Full Code Here

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

        return new krati.core.segment.MemorySegmentFactory();
    }
   
    protected ArrayStorePartition getDataPartition(File homeDir) throws Exception {
        ArrayStorePartition partition =
            new StaticArrayStorePartition(_idStart,
                                          _idCount,
                                          homeDir,
                                          getSegmentFactory(),
                                          _segFileSizeMB);
        return partition;
View Full Code Here

TOP

Related Classes of krati.store.StaticArrayStorePartition

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.