StoreConfig storeConfig = new StoreConfig(homeDir, initialCapacity);
storeConfig.setSegmentFactory(segmentFactory);
storeConfig.setHashFunction(hashFunction);
storeConfig.setSegmentFileSizeMB(segmentFileSize);
DataStore dynamicDataStore = new DynamicDataStore(storeConfig);
result = new SerializableObjectStore(dynamicDataStore, keySerializer, valueSerializer);
} catch (Exception e) {
throw new RuntimeCamelException("Failed to create Krati DataStore.", e);
}
return result;
}