BufferedBlockManager Class Reference
[BlockManagers]

#include <BufferedBlockManager.h>

Inheritance diagram for BufferedBlockManager:

Inheritance graph
[legend]
Collaboration diagram for BufferedBlockManager:

Collaboration graph
[legend]

List of all members.


Detailed Description

The BufferedBlockManager provides the BlockManager, using a FileBlockManager. It provides a thread for background loading of file blocks in response to explicit prefetchBlock() requests and in advance of the actual getBlock() requests for block data.

Definition at line 55 of file BufferedBlockManager.h.


Public Member Functions

virtual void prefetchBlock (uint64_t index)
 suggestion, request the block to be prepared for future getting
virtual int flush ()
 flush storage, e.g. to disk
virtual std::string getBlock (uint64_t index)
 get the block at the given index
virtual size_t setBlock (uint64_t index, const std::string &buffer)
 set the block at the given index
virtual int open (const std::string &p, const char *mode)
 open the block manager. The path may be used by some to open a file with a given mode
virtual int close ()
 close the block manager, flushing to disk and cleaning up state
virtual bool isOpen () const
 return whether the block manager is open
virtual const std::string & getPath () const
 return the path, if any, of the storage backing
virtual std::string getFileName () const
 return the filename (without path)
virtual size_t getBlockSize () const
 return the block size
virtual void setBlockSize (size_t s)
 set the block size
virtual uint64_t getBlockCount () const
 return the number of blocks
virtual uint64_t getSize () const
 return the size in bytes

Static Public Attributes

static const uint DEFAULT_BUFFER_CAPACITY = 256
 buffer size in blocks

The documentation for this class was generated from the following files:

Generated on Sat Oct 4 21:30:26 2008 for Mace Library by  doxygen 1.5.5