/** * Creates a new instance. * * @param serializationFactory * The factory defining the object serialisation implementation. * @param comparator * The comparator to be used for sorting the results. * @param useCompression * If true, the storage files will be compressed. */ public FileBasedSort( ObjectSerializationFactory serializationFactory, Comparator<T> comparator, boolean useCompression) { this.serializationFactory = serializationFactory; this.comparator = comparator; this.useCompression = useCompression; chunkedEntityStore = new ChunkedObjectStore<T>(serializationFactory, "emta", "idx", useCompression); addBuffer = new ArrayList<T>(MAX_MEMORY_SORT_COUNT); }
/** * Creates a new instance. * * @param serializationFactory * The factory defining the object serialisation implementation. * @param comparator * The comparator to be used for sorting the results. * @param useCompression * If true, the storage files will be compressed. */ public FileBasedSort( ObjectSerializationFactory serializationFactory, Comparator<T> comparator, boolean useCompression) { this.serializationFactory = serializationFactory; this.comparator = comparator; this.useCompression = useCompression; chunkedEntityStore = new ChunkedObjectStore<T>(serializationFactory, "emta", "idx", useCompression); addBuffer = new ArrayList<T>(MAX_MEMORY_SORT_COUNT); }