#include <extsort.h>
Classes | |
class | FileIterator |
class | Iterator |
class | MyCmp |
Public Types | |
typedef pair< BSONObj, DiskLoc > | Data |
typedef FastArray< Data > | InMemory |
Public Member Functions | |
void | add (const BSONObj &o, int a, int b) |
void | add (const BSONObj &o, const DiskLoc &loc) |
BSONObjExternalSorter (const BSONObj &order=BSONObj(), long maxFileSize=1024 *1024 *100) | |
long | getCurSizeSoFar () |
void | hintNumObjects (long long numObjects) |
auto_ptr< Iterator > | iterator () |
int | numFiles () |
void | sort () |
~BSONObjExternalSorter () | |
Private Member Functions | |
void | _sortInMem () |
void | finishMap () |
void | sort (string file) |
Static Private Member Functions | |
static int | extSortComp (const void *lv, const void *rv) |
Private Attributes | |
int | _arraySize |
InMemory * | _cur |
long | _curSizeSoFar |
list< string > | _files |
long | _maxFilesize |
BSONObj | _order |
path | _root |
bool | _sorted |
Static Private Attributes | |
static unsigned long long | _compares |
static BSONObj | extSortOrder |
for sorting by BSONObj and attaching a value
Definition at line 32 of file extsort.h.
typedef pair<BSONObj,DiskLoc> mongo::BSONObjExternalSorter::Data |
mongo::BSONObjExternalSorter::BSONObjExternalSorter | ( | const BSONObj & | order = BSONObj() , |
|
long | maxFileSize = 1024 *1024 *100 | |||
) |
mongo::BSONObjExternalSorter::~BSONObjExternalSorter | ( | ) |
void mongo::BSONObjExternalSorter::_sortInMem | ( | ) | [private] |
void mongo::BSONObjExternalSorter::add | ( | const BSONObj & | o, | |
int | a, | |||
int | b | |||
) | [inline] |
static int mongo::BSONObjExternalSorter::extSortComp | ( | const void * | lv, | |
const void * | rv | |||
) | [inline, static, private] |
void mongo::BSONObjExternalSorter::finishMap | ( | ) | [private] |
long mongo::BSONObjExternalSorter::getCurSizeSoFar | ( | ) | [inline] |
void mongo::BSONObjExternalSorter::hintNumObjects | ( | long long | numObjects | ) | [inline] |
auto_ptr<Iterator> mongo::BSONObjExternalSorter::iterator | ( | ) | [inline] |
void mongo::BSONObjExternalSorter::sort | ( | string | file | ) | [private] |
void mongo::BSONObjExternalSorter::sort | ( | ) |
int mongo::BSONObjExternalSorter::_arraySize [private] |
unsigned long long mongo::BSONObjExternalSorter::_compares [static, private] |
InMemory* mongo::BSONObjExternalSorter::_cur [private] |
long mongo::BSONObjExternalSorter::_curSizeSoFar [private] |
list<string> mongo::BSONObjExternalSorter::_files [private] |
long mongo::BSONObjExternalSorter::_maxFilesize [private] |
BSONObj mongo::BSONObjExternalSorter::_order [private] |
path mongo::BSONObjExternalSorter::_root [private] |
bool mongo::BSONObjExternalSorter::_sorted [private] |
BSONObj mongo::BSONObjExternalSorter::extSortOrder [static, private] |