BlockManager Class Reference
[BlockManagers]

#include <BlockManager.h>

Inheritance diagram for BlockManager:

Inheritance graph
[legend]

List of all members.


Detailed Description

The base class (pure virtual) of a block manager interface for referencing files or segments as a set of blocks.

Subclasses may provide additional functionality, such as filesystem access, encryption, etc.

Definition at line 58 of file BlockManager.h.


Public Member Functions

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

Static Public Attributes

static const size_t DEFAULT_BLOCK_SIZE = 32768
 the default block size

Member Function Documentation

virtual uint32_t BlockManager::getMinimumInterested (  )  const [inline, virtual]

Huh?

Todo:
Ryan, what are getMinimumInterested and getMaximumInterested

Definition at line 69 of file BlockManager.h.


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