mongo::FileAllocator Class Reference

#include <file_allocator.h>

List of all members.

Public Member Functions

void allocateAsap (const string &name, unsigned long long &size)
void requestAllocation (const string &name, long &size)
void start ()
void waitUntilFinished () const

Static Public Member Functions

static void ensureLength (int fd, long size)
static FileAllocatorget ()

Private Member Functions

void checkFailure ()
 FileAllocator ()
bool inProgress (const string &name) const
long prevSize (const string &name) const

Static Private Member Functions

static void run (FileAllocator *fa)

Private Attributes

bool _failed
list< string > _pending
mongo::mutex _pendingMutex
map< string, long > _pendingSize
boost::condition _pendingUpdated

Static Private Attributes

static FileAllocator_instance

Detailed Description

Definition at line 27 of file file_allocator.h.


Constructor & Destructor Documentation

mongo::FileAllocator::FileAllocator (  )  [private]

Member Function Documentation

void mongo::FileAllocator::allocateAsap ( const string &  name,
unsigned long long &  size 
)

Returns when file has been allocated. If file exists, size is updated to match existing file size.

void mongo::FileAllocator::checkFailure (  )  [private]
static void mongo::FileAllocator::ensureLength ( int  fd,
long  size 
) [static]
static FileAllocator* mongo::FileAllocator::get (  )  [static]
Returns:
the singletone
bool mongo::FileAllocator::inProgress ( const string &  name  )  const [private]
long mongo::FileAllocator::prevSize ( const string &  name  )  const [private]
void mongo::FileAllocator::requestAllocation ( const string &  name,
long &  size 
)

May be called if file exists. If file exists, or its allocation has been requested, size is updated to match existing file size.

static void mongo::FileAllocator::run ( FileAllocator fa  )  [static, private]

called from the worked thread

void mongo::FileAllocator::start (  ) 
void mongo::FileAllocator::waitUntilFinished (  )  const

Member Data Documentation

Definition at line 79 of file file_allocator.h.

Definition at line 82 of file file_allocator.h.

list< string > mongo::FileAllocator::_pending [private]

Definition at line 76 of file file_allocator.h.

Definition at line 73 of file file_allocator.h.

map< string, long > mongo::FileAllocator::_pendingSize [mutable, private]

Definition at line 77 of file file_allocator.h.

boost::condition mongo::FileAllocator::_pendingUpdated [mutable, private]

Definition at line 74 of file file_allocator.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:55 2013