ACE 8.0.1
|
A hash table holding the information about entry point into the Cached Virtual Filesystem. On insertion, the reference count is incremented. On destruction, reference count is decremented. More...
#include <Filecache.h>
Public Types | |
enum | { ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE = 512 , ACE_DEFAULT_VIRTUAL_FILESYSTEM_CACHE_SIZE = 20 } |
Public Member Functions | |
~ACE_Filecache () | |
int | find (const ACE_TCHAR *filename) |
ACE_Filecache_Object * | fetch (const ACE_TCHAR *filename, int mapit=1) |
ACE_Filecache_Object * | remove (const ACE_TCHAR *filename) |
Remove the file associated with `‘filename’' from the cache. | |
ACE_Filecache_Object * | create (const ACE_TCHAR *filename, int size) |
Create a new Filecache_Object, returns it. | |
ACE_Filecache_Object * | finish (ACE_Filecache_Object *&new_file) |
Static Public Member Functions | |
static ACE_Filecache * | instance () |
Singleton pattern. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Protected Member Functions | |
ACE_Filecache_Object * | insert_i (const ACE_TCHAR *filename, ACE_SYNCH_RW_MUTEX &filelock, int mapit) |
ACE_Filecache_Object * | remove_i (const ACE_TCHAR *filename) |
ACE_Filecache_Object * | update_i (const ACE_TCHAR *filename, ACE_SYNCH_RW_MUTEX &filelock, int mapit) |
ACE_Filecache () | |
Prevent it from being called. | |
Private Attributes | |
ACE_OFF_T | size_ |
ACE_Filecache_Hash | hash_ |
The hash table. | |
ACE_SYNCH_RW_MUTEX | hash_lock_ [ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE] |
ACE_SYNCH_RW_MUTEX | file_lock_ [ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE] |
Static Private Attributes | |
static ACE_Filecache * | cvf_ = 0 |
The reference to the instance. | |
A hash table holding the information about entry point into the Cached Virtual Filesystem. On insertion, the reference count is incremented. On destruction, reference count is decremented.
ACE_Filecache::~ACE_Filecache | ( | ) |
|
protected |
Prevent it from being called.
ACE_Filecache_Object * ACE_Filecache::create | ( | const ACE_TCHAR * | filename, |
int | size ) |
Create a new Filecache_Object, returns it.
ACE_Filecache_Object * ACE_Filecache::fetch | ( | const ACE_TCHAR * | filename, |
int | mapit = 1 ) |
Return the file associated with `‘filename’' if it is in the cache, or create if not.
Returns 0 if the file associated with `‘filename’' is in the cache, or -1 if not.
ACE_Filecache_Object * ACE_Filecache::finish | ( | ACE_Filecache_Object *& | new_file | ) |
Release an acquired Filecache_Object, returns it again or NULL if it was deleted.
|
protected |
|
static |
Singleton pattern.
ACE_Filecache_Object * ACE_Filecache::remove | ( | const ACE_TCHAR * | filename | ) |
Remove the file associated with `‘filename’' from the cache.
|
protected |
|
protected |
ACE_Filecache::ACE_ALLOC_HOOK_DECLARE |
|
staticprivate |
The reference to the instance.
|
private |
|
private |
The hash table.
|
private |
|
private |