Package krati.core.segment

Examples of krati.core.segment.MemorySegmentFactory


        return new DynamicDataSet(storeDir, 2 /* initLevel */, _segFileSizeMB, getSegmentFactory());
    }
   
    @Override
    protected SegmentFactory getSegmentFactory() {
        return new MemorySegmentFactory();
    }
View Full Code Here


        assertEquals(config.getHashLoadFactor(), config.getHashLoadFactor());
       
        File propertiesFile = new File(getHomeDir(), StoreConfig.CONFIG_PROPERTIES_FILE+".new");
       
        config.setHashFunction(new Fnv1aHash64());
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(StoreParams.SEGMENT_FILE_SIZE_MB_MIN);
        config.setNumSyncBatches(StoreParams.BATCH_SIZE_MIN);
        config.setBatchSize(StoreParams.BATCH_SIZE_MIN);
        config.save(propertiesFile, null);
       
View Full Code Here

            e.printStackTrace();
        }
    }
   
    protected SegmentFactory createSegmentFactory() {
        return new MemorySegmentFactory();
    }
View Full Code Here

     * such as DynamicDataStore and IndexedDataStore or provide a specific SegmentFactory
     * such as ChannelSegmentFactory, MappedSegmentFactory and WriteBufferSegment.
     */
    protected DataStore<byte[], byte[]> createDataStore(File homeDir, int initialCapacity) throws Exception {
        StoreConfig config = new StoreConfig(homeDir, initialCapacity);
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(64);
       
        return StoreFactory.createStaticDataStore(config);
    }
View Full Code Here

     * @param idCount    the count of member IDs.
     * @throws Exception if a partition instance can not be created.
     */
    public KratiDataPartition(File homeDir, int idStart, int idCount) throws Exception {
        StorePartitionConfig config = new StorePartitionConfig(homeDir, idStart, idCount);
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(64);
       
        _partition = StoreFactory.createArrayStorePartition(config);
    }
View Full Code Here

    }
   
    protected abstract HashFunction<byte[]> createHashFunction();
   
    protected SegmentFactory createSegmentFactory() {
        return new MemorySegmentFactory();
    }
View Full Code Here

                                 getSegmentFactory());
    }
   
    @Override
    protected SegmentFactory getSegmentFactory() {
        return new MemorySegmentFactory();
    }
View Full Code Here

        }
    }
   
    protected DataSet<byte[]> createDataSet(File homeDir, int initialCapacity) throws Exception {
        StoreConfig config = new StoreConfig(homeDir, initialCapacity);
        config.setSegmentFactory(new MemorySegmentFactory());
        config.setSegmentFileSizeMB(32);
       
        return StoreFactory.createDynamicDataSet(config);
    }
View Full Code Here

TOP

Related Classes of krati.core.segment.MemorySegmentFactory

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.