use of krati.store.DynamicDataSet in project camel by apache.
the class KratiHelper method createDataSet.
/**
* Creates a {@link krati.store.DynamicDataSet} with the given parameters.
*
* @param path The directory which the set will use.
* @param initialCapacity
* @param segmentFactory The segment factory, defaults to {@link krati.core.segment.ChannelSegmentFactory}.
* @return
*/
public static DataSet<byte[]> createDataSet(String path, int initialCapacity, SegmentFactory segmentFactory) {
DataSet<byte[]> result = null;
File homeDir = new File(path);
homeDir.mkdirs();
try {
result = new DynamicDataSet(homeDir, initialCapacity, segmentFactory);
} catch (Exception e) {
throw new RuntimeCamelException("Failed to create Krati DataSet. This exception is ignored.", e);
}
return result;
}
Aggregations