StorageCache Class Reference

#include <storage_cache.h>

Inheritance diagram for StorageCache:

Public Member Functions

 StorageCache ()
zmm::Ref< CacheObjectgetObject (int id)
zmm::Ref< CacheObjectgetObjectDefinitely (int id)
bool removeObject (int id)
void clear ()
zmm::Ref< zmm::Array
< CacheObject > > 
getObjects (zmm::String location)
void checkLocation (zmm::Ref< CacheObject > obj)
void addChild (int id)
bool flushed ()
zmm::Ref< MutexgetMutex ()
void retain ()
void release ()
int getRefCount ()

Static Public Member Functions

static void * operator new (size_t size)
static void operator delete (void *ptr)

Protected Attributes

mt_atomic_t _ref_count

Private Member Functions

void ensureFillLevelOk ()

Private Attributes

int capacity
int maxfill
bool hasBeenFlushed
zmm::Ref< DBOHash< int,
CacheObject > > 
zmm::Ref< DSOHash< zmm::Array
< CacheObject > > > 
zmm::Ref< Mutexmutex

Detailed Description

Definition at line 44 of file storage_cache.h.

Constructor & Destructor Documentation

StorageCache::StorageCache (  ) 

Member Function Documentation

void StorageCache::addChild ( int  id  ) 

Definition at line 80 of file

References idHash, mutex, and nil.

void StorageCache::checkLocation ( zmm::Ref< CacheObject obj  ) 

Definition at line 111 of file

References locationHash, mutex, and nil.

void StorageCache::clear (  ) 

Definition at line 50 of file

References AUTOLOCK, idHash, locationHash, and mutex.

void StorageCache::ensureFillLevelOk (  )  [private]

Definition at line 146 of file

References hasBeenFlushed, idHash, locationHash, maxfill, and mutex.

Referenced by getObjectDefinitely().

bool StorageCache::flushed (  ) 

Definition at line 136 of file

References hasBeenFlushed.

zmm::Ref<Mutex> StorageCache::getMutex (  )  [inline]

Definition at line 63 of file storage_cache.h.

References mutex.

Ref< CacheObject > StorageCache::getObject ( int  id  ) 

Definition at line 57 of file

References idHash, and mutex.

Referenced by removeObject().

Ref< CacheObject > StorageCache::getObjectDefinitely ( int  id  ) 

Definition at line 65 of file

References ensureFillLevelOk(), idHash, mutex, and nil.

Ref< Array< CacheObject > > StorageCache::getObjects ( zmm::String  location  ) 

Definition at line 103 of file

References locationHash, and mutex.

int Object::getRefCount (  )  [inherited]

Definition at line 78 of file

References zmm::Object::_ref_count, and atomic_get().

void Object::operator delete ( void *  ptr  )  [static, inherited]

Definition at line 87 of file

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file

References MALLOC.

void Object::release (  )  [inherited]
bool StorageCache::removeObject ( int  id  ) 

Definition at line 92 of file

References AUTOLOCK, getObject(), idHash, locationHash, mutex, and nil.

void Object::retain (  )  [inherited]

Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
int StorageCache::capacity [private]

Definition at line 67 of file storage_cache.h.

Referenced by StorageCache().

Definition at line 69 of file storage_cache.h.

Referenced by ensureFillLevelOk(), flushed(), and StorageCache().

int StorageCache::maxfill [private]

Definition at line 68 of file storage_cache.h.

Referenced by ensureFillLevelOk(), and StorageCache().

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

Generated on Fri Mar 26 20:16:57 2010 for MediaTomb by  doxygen 1.6.1