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

Comparable buffer for IRecordReader<T>. It is used by Sorter<T> when merging different files. The buffers are sorted using their next record. More...

Inheritance diagram for Summer.Batch.Extra.Sort.RecordReaderBuffer< T >:

Public Member Functions

 RecordReaderBuffer (IRecordReader< T > reader, IComparer< T > comparer)
 Default constructor More...
 
Read ()
 Reads a record. More...
 
bool HasNext ()
 
Returns
true if there are more items to read, false otherwise

 
int CompareTo (RecordReaderBuffer< T > other)
 Compares with another buffer by comparing the next item of each buffer. More...
 
void Dispose ()
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Actually disposes the current object. More...
 

Detailed Description

Comparable buffer for IRecordReader<T>. It is used by Sorter<T> when merging different files. The buffers are sorted using their next record.

Template Parameters
T the type of the records
Type Constraints
T :class 

Constructor & Destructor Documentation

Summer.Batch.Extra.Sort.RecordReaderBuffer< T >.RecordReaderBuffer ( IRecordReader< T >  reader,
IComparer< T >  comparer 
)

Default constructor

Parameters
readerthe reader to read from
comparerthe comparer for the records

Member Function Documentation

Compares with another buffer by comparing the next item of each buffer.

Parameters
otheranother buffer
Returns
the comparison of the two buffers

See also
IDisposable::Dispose
virtual void Summer.Batch.Extra.Sort.RecordReaderBuffer< T >.Dispose ( bool  disposing)
protectedvirtual

Actually disposes the current object.

Parameters
disposingIndicates whether the method was invoked from the IDisposable.Dispose implementation or from the finalizer

Reads a record.

Returns
the next record

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