CacheManager Class Reference

<class description="" goes="" here=""> <short description=""> More...

#include <CacheManager.hpp>

Inheritance diagram for CacheManager:

CacheManagerLRU List of all members.

Public Member Functions

virtual void putVideo (ContainerInfo *video, u32 dskSpaceReserved=0)=0
virtual ContainerInfogetVideo (const Url *URL)=0
virtual MetaObjectfindMetaObject (const Url *url)=0
virtual void deleteMetaObject (const Url *url)=0
virtual u32 getCacheSize ()
virtual u32 getMaxObjectSize ()
void lockCache ()
void unlockCache ()
bool reserveDiskSpace (u32 dskSpace)
 doesn't lock cache, when calling you must do this outside this function lockCache and unlockCache
void freeDiskSpace (u32 dskSpace)
 call this when a reservation has to be cancelled
virtual u32 getActSize ()
virtual u32 getRequests ()
virtual u32 getHits ()
virtual u64 getByteRequested ()
virtual u64 getByteHits ()
virtual double getQualityHits ()
virtual void getContent ()=0
virtual void saveCacheIndexToDir (const char *dir)=0
void saveStatisticTo (FILE *fp)

Protected Member Functions

virtual bool replace (bool testPriorDelete)=0

Protected Attributes

u32 cacheSize
u32 actSize
u32 requests
u32 hits
u64 byteRequested
u64 byteHits
double qualityHits
VMutex lock
bool serverMode
 set to true if the cachemanager is used in a server and you don't want the cache manager to compare the IP address of the request with it's local IP

Detailed Description

<class description="" goes="" here=""> <short description="">

Author:
Michael Kropfberger and Peter Schojer
Version:
Id
CacheManager.hpp,v 1.11 2005/04/27 10:21:50 klschoef Exp

Definition at line 70 of file CacheManager.hpp.


Member Function Documentation

virtual bool CacheManager::replace bool  testPriorDelete  )  [protected, pure virtual]
 

Parameters:
testPriorDelete tests if enough disk space can be freed so that the actSize is below the cacheSize or if too many objects are locked If this test fails, no files are removed form the cache and false is returned

Implemented in CacheManagerLRU.

Referenced by reserveDiskSpace().


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