Package fr.gouv.vitam.storage.engine.server.offerdiff.sort

# Class LargeFileSorter<T>

java.lang.Object
fr.gouv.vitam.storage.engine.server.offerdiff.sort.LargeFileSorter<T>

public class LargeFileSorter<T> extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `INITIAL_FILE_CHUNK_SIZE_TO_SORT_IN_MEMORY`
  `static final int`
  `NB_FILES_TO_MERGE_SORT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LargeFileSorter(Function<File,LargeFileReader<T>> fileReaderFactory, Function<File,LargeFileWriter<T>> fileWriterFactory, Comparator<T> entryComparator, Supplier<File> tempFileCreator)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `File`
  `sortLargeFile(File inputFile)`
  Sorts a large file using entryComparator.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### INITIAL_FILE_CHUNK_SIZE_TO_SORT_IN_MEMORY

    public static final int INITIAL_FILE_CHUNK_SIZE_TO_SORT_IN_MEMORY
    See Also:
      - Constant Field Values

  - ### NB_FILES_TO_MERGE_SORT

    public static final int NB_FILES_TO_MERGE_SORT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### LargeFileSorter

    public LargeFileSorter(Function<File,LargeFileReader<T>> fileReaderFactory, Function<File,LargeFileWriter<T>> fileWriterFactory, Comparator<T> entryComparator, Supplier<File> tempFileCreator)

- ## Method Details

  - ### sortLargeFile

    public File sortLargeFile(File inputFile) throws IOException
    Sorts a large file using entryComparator.
    Parameters:
      `inputFile` - the input stream to sort
    Throws:
      `IOException`