adbncfs  0.9.1
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
FileCache Class Reference

A cache for file attributes and resolved links. More...

#include <fileInfoCache.h>

Classes

class  Entry
 Represents an entry of FileCache. More...
 

Public Member Functions

 FileCache ()
 Default constructor. More...
 
virtual ~FileCache ()
 Virtual destructor. More...
 
void putStat (const char *pcPath, const deque< string > &statOutput)
 Caches the output of doStat(). More...
 
void putReadLink (const char *pcPath, const deque< string > &readLinkOutput)
 Caches the output of adbnc_readlink(). More...
 
const deque< string > * getStat (const char *pcPath) const
 
const deque< string > * getReadLink (const char *pcPath) const
 
void invalidate (const char *pcPath)
 Renders the cashed data for the given file as invalid. More...
 

Private Member Functions

 FileCache (const FileCache &orig)
 Prevent copy-construction. More...
 
FileCache operator= (const FileCache &orig)
 Prevent assignment. More...
 
bool isValid (const Entry &entry) const
 Tests if the given cache entry is valid. More...
 

Private Attributes

map< string, Entrym_Entries
 

Detailed Description

A cache for file attributes and resolved links.

Definition at line 38 of file fileInfoCache.h.

Constructor & Destructor Documentation

FileCache::FileCache ( )
inline

Default constructor.

Definition at line 42 of file fileInfoCache.h.

virtual FileCache::~FileCache ( )
inlinevirtual

Virtual destructor.

Definition at line 45 of file fileInfoCache.h.

FileCache::FileCache ( const FileCache orig)
private

Prevent copy-construction.

Member Function Documentation

const deque< string > * FileCache::getReadLink ( const char *  pcPath) const

Definition at line 164 of file fileinfoCache.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const deque< string > * FileCache::getStat ( const char *  pcPath) const

Definition at line 150 of file fileinfoCache.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FileCache::invalidate ( const char *  pcPath)

Renders the cashed data for the given file as invalid.

Parameters
pcPaththe pathname to the file.

Definition at line 183 of file fileinfoCache.cpp.

Here is the caller graph for this function:

bool FileCache::isValid ( const Entry entry) const
private

Tests if the given cache entry is valid.

Parameters
entrythe entry to test.

Definition at line 195 of file fileinfoCache.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

FileCache FileCache::operator= ( const FileCache orig)
private

Prevent assignment.

void FileCache::putReadLink ( const char *  pcPath,
const deque< string > &  readLinkOutput 
)

Caches the output of adbnc_readlink().

Parameters
pcPaththe pathname of the file thats resolved link to cache.
readLinkOutputa reference to resolved link name.

Definition at line 134 of file fileinfoCache.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FileCache::putStat ( const char *  pcPath,
const deque< string > &  statOutput 
)

Caches the output of doStat().

Parameters
pcPaththe pathname of the file thats data to cache.
statOutputa reference to the data to cache.

Definition at line 111 of file fileinfoCache.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

map<string, Entry> FileCache::m_Entries
private

Definition at line 99 of file fileInfoCache.h.


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