Summer.Batch.Extra.Sort.Sorter< T > Class Template Reference

Sorts a collection of files. Files are read as records using a IRecordReader<T>. Records can be filtered using Filter. InputFormatter allows to format the records before they are sorted. If Comparer is not set, records are copied in the order they are read, but they are still filtered or formatted. More...

Public Member Functions

void Sort ()
 Sorts files. If the files are too big to be sorted in memory, they are sorted by blocks saved on disk in temporary files, which are then merged to produce the final output file. More...
 

Properties

IList< FileInfo > InputFiles [get, set]
 The files to sort. More...
 
ICollection< IOutputFile< T > > OutputFiles [get, set]
 The output files. More...
 
IComparer< T > Comparer [get, set]
 The IComparer<T> used for sorting the files. More...
 
IFilter< T > Filter [get, set]
 The filter used for selecting the records. More...
 
IFormatter< T > InputFormatter [get, set]
 Formatter used while reading records. More...
 
ISum< T > Sum [get, set]
 If not null, used to sum records that are identical according to Comparer. More...
 
int HeaderSize [get, set]
 The size of the header at the begining of the file. The header is copied as is at the begining of the resulting file. More...
 
IRecordAccessorFactory< T > RecordAccessorFactory [get, set]
 Factory for creating the record readers and writers. More...
 
long MaxInMemorySize [get, set]
 The maximum size in MB of the input files for the in memory sort. If the input files are over this limit, external merge sort is used. Default is 100. More...
 

Detailed Description

Sorts a collection of files. Files are read as records using a IRecordReader<T>. Records can be filtered using Filter. InputFormatter allows to format the records before they are sorted. If Comparer is not set, records are copied in the order they are read, but they are still filtered or formatted.

Template Parameters
T The type of the records to sort.
Type Constraints
T :class 

Member Function Documentation

void Summer.Batch.Extra.Sort.Sorter< T >.Sort ( )

Sorts files. If the files are too big to be sorted in memory, they are sorted by blocks saved on disk in temporary files, which are then merged to produce the final output file.

Property Documentation

IComparer<T> Summer.Batch.Extra.Sort.Sorter< T >.Comparer
getset

The IComparer<T> used for sorting the files.

IFilter<T> Summer.Batch.Extra.Sort.Sorter< T >.Filter
getset

The filter used for selecting the records.

int Summer.Batch.Extra.Sort.Sorter< T >.HeaderSize
getset

The size of the header at the begining of the file. The header is copied as is at the begining of the resulting file.

IList<FileInfo> Summer.Batch.Extra.Sort.Sorter< T >.InputFiles
getset

The files to sort.

IFormatter<T> Summer.Batch.Extra.Sort.Sorter< T >.InputFormatter
getset

Formatter used while reading records.

long Summer.Batch.Extra.Sort.Sorter< T >.MaxInMemorySize
getset

The maximum size in MB of the input files for the in memory sort. If the input files are over this limit, external merge sort is used. Default is 100.

ICollection<IOutputFile<T> > Summer.Batch.Extra.Sort.Sorter< T >.OutputFiles
getset

The output files.

IRecordAccessorFactory<T> Summer.Batch.Extra.Sort.Sorter< T >.RecordAccessorFactory
getset

Factory for creating the record readers and writers.

If not null, used to sum records that are identical according to Comparer.


The documentation for this class was generated from the following file:
  • Summer.Batch.Extra/Sort/Sorter.cs