Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

FdCache.C File Reference

#include "Basics.H"
#include "FdCache.H"
#include "ShortIdKey.H"
#include "logging.H"
#include <Thread.H>
#include <fcntl.h>
#include "timing.H"

Go to the source code of this file.

Namespaces

namespace  FdCache

Typedefs

typedef ::Table< ShortIdKey,
FdInfo * >::Default 
FdTable
typedef ::Table< ShortIdKey,
FdInfo * >::Iterator 
FdIter

Functions

void FdCache::PartialCache::fdiDeleteNL (FdCache::FdInfo *fdi, char *where)
void FdCache::PartialCache::janitor_sweep (time_t now) throw ()
void * JanitorThread (void *arg)
int FdCache::PartialCache::lookup (ShortIdKey &key, FdCache::OFlag ofl, FdCache::OFlag &oflout) throw ()
int FdCache::open (ShortId sid, FdCache::OFlag ofl, FdCache::OFlag *oflout) throw ()
int FdCache::PartialCache::open (ShortId sid, FdCache::OFlag ofl, FdCache::OFlag *oflout) throw ()
int FdCache::tryopen (ShortId sid, FdCache::OFlag ofl, FdCache::OFlag *oflout) throw ()
int FdCache::PartialCache::tryopen (ShortId sid, FdCache::OFlag ofl, FdCache::OFlag *oflout) throw ()
void FdCache::close (ShortId sid, int fd, FdCache::OFlag ofl) throw ()
void FdCache::PartialCache::close (ShortId sid, int fd, FdCache::OFlag ofl) throw ()
void FdCache::flush (ShortId sid, FdCache::OFlag ofl) throw ()
void FdCache::PartialCache::flush (ShortId sid, FdCache::OFlag ofl) throw ()
void FdCache::getStats (Basics::uint32 &n_in_cache, Basics::uint64 &hits, Basics::uint64 &open_misses, Basics::uint64 &try_misses, Basics::uint64 &evictions, Basics::uint64 &expirations)
void FdCache::PartialCache::accumulateStats (Basics::uint32 &n_in_cache, Basics::uint64 &hits, Basics::uint64 &open_misses, Basics::uint64 &try_misses, Basics::uint64 &evictions, Basics::uint64 &expirations)


Typedef Documentation

typedef ::Table<ShortIdKey, FdInfo*>::Iterator FdCache::FdIter
 

Definition at line 55 of file FdCache.C.

typedef ::Table<ShortIdKey, FdInfo*>::Default FdCache::FdTable
 

Definition at line 54 of file FdCache.C.


Function Documentation

void FdCache::close ShortId  sid,
int  fd,
FdCache::OFlag  ofl
throw ()
 

Definition at line 366 of file FdCache.C.

References FdCache::PartialCache::close().

void FdCache::flush ShortId  sid,
FdCache::OFlag  ofl
throw ()
 

Definition at line 414 of file FdCache.C.

References FdCache::PartialCache::flush().

void FdCache::getStats Basics::uint32 n_in_cache,
Basics::uint64 &  hits,
Basics::uint64 &  open_misses,
Basics::uint64 &  try_misses,
Basics::uint64 &  evictions,
Basics::uint64 &  expirations
 

Definition at line 461 of file FdCache.C.

References FdCache::PartialCache::accumulateStats().

int FdCache::open ShortId  sid,
FdCache::OFlag  ofl,
FdCache::OFlag oflout
throw ()
 

Definition at line 266 of file FdCache.C.

References FdCache::PartialCache::open().

void FdCache::PartialCache::accumulateStats Basics::uint32 n_in_cache,
Basics::uint64 &  hits,
Basics::uint64 &  open_misses,
Basics::uint64 &  try_misses,
Basics::uint64 &  evictions,
Basics::uint64 &  expirations
 

Definition at line 488 of file FdCache.C.

References FdCache::PartialCache::evict_count, FdCache::PartialCache::expire_count, FdCache::PartialCache::hit_count, Basics::mutex::lock(), FdCache::PartialCache::mu, FdCache::PartialCache::nCached, FdCache::PartialCache::open_miss_count, FdCache::PartialCache::try_miss_count, and Basics::mutex::unlock().

void FdCache::PartialCache::close ShortId  sid,
int  fd,
FdCache::OFlag  ofl
throw ()
 

Definition at line 375 of file FdCache.C.

References FdCache::any, DBG_FDCACHE, Repos::dprintf(), FdCache::PartialCache::evict_count, FdCache::FdInfo::fd, FdCache::PartialCache::fdiDeleteNL(), FdCache::FdInfo::key, FdCache::FdInfo::lastUse, Basics::mutex::lock(), FdCache::PartialCache::lruListHead, FdCache::FdInfo::more, FdCache::FdInfo::moreprev, FdCache::PartialCache::mu, FdCache::PartialCache::nCached, NEW, FdCache::FdInfo::next, FdCache::FdInfo::ofl, FdCache::FdInfo::prev, RECORD_TIME_POINT, FdCache::PartialCache::table, and Basics::mutex::unlock().

void FdCache::PartialCache::fdiDeleteNL FdCache::FdInfo fdi,
char *  where
 

Definition at line 116 of file FdCache.C.

References FdCache::PartialCache::close(), DBG_FDCACHE, Repos::dprintf(), ok(), and FdCache::PartialCache::table.

void FdCache::PartialCache::flush ShortId  sid,
FdCache::OFlag  ofl
throw ()
 

Definition at line 423 of file FdCache.C.

References FdCache::any, FdCache::PartialCache::close(), DBG_FDCACHE, Repos::dprintf(), FdCache::FdInfo::fd, Basics::mutex::lock(), FdCache::FdInfo::more, FdCache::FdInfo::moreprev, FdCache::PartialCache::mu, FdCache::PartialCache::nCached, FdCache::FdInfo::next, FdCache::FdInfo::ofl, FdCache::FdInfo::prev, FdCache::PartialCache::table, and Basics::mutex::unlock().

void FdCache::PartialCache::janitor_sweep time_t  now  )  throw ()
 

Definition at line 138 of file FdCache.C.

References FdCache::PartialCache::expire_count, FdCache::PartialCache::fdiDeleteNL(), Basics::mutex::lock(), FdCache::PartialCache::mu, FdCache::PartialCache::nCached, and Basics::mutex::unlock().

int FdCache::PartialCache::lookup ShortIdKey key,
FdCache::OFlag  ofl,
FdCache::OFlag oflout
throw ()
 

Definition at line 223 of file FdCache.C.

References FdCache::any, FdCache::FdInfo::fd, FdCache::FdInfo::more, FdCache::FdInfo::moreprev, FdCache::PartialCache::nCached, FdCache::FdInfo::next, FdCache::FdInfo::ofl, FdCache::FdInfo::prev, and FdCache::PartialCache::table.

int FdCache::PartialCache::open ShortId  sid,
FdCache::OFlag  ofl,
FdCache::OFlag oflout
throw ()
 

! heuristic

Definition at line 275 of file FdCache.C.

References FdCache::any, DBG_FDCACHE, Repos::dprintf(), SourceOrDerived::fdopen(), FdCache::PartialCache::hit_count, Basics::mutex::lock(), FdCache::PartialCache::lookup(), FdCache::PartialCache::mu, FdCache::PartialCache::open_miss_count, RECORD_TIME_POINT, FdCache::ro, and Basics::mutex::unlock().

int FdCache::PartialCache::tryopen ShortId  sid,
FdCache::OFlag  ofl,
FdCache::OFlag oflout
throw ()
 

Definition at line 332 of file FdCache.C.

References FdCache::any, DBG_FDCACHE, Repos::dprintf(), FdCache::PartialCache::hit_count, Basics::mutex::lock(), FdCache::PartialCache::lookup(), FdCache::PartialCache::mu, RECORD_TIME_POINT, FdCache::PartialCache::try_miss_count, and Basics::mutex::unlock().

int FdCache::tryopen ShortId  sid,
FdCache::OFlag  ofl,
FdCache::OFlag oflout
throw ()
 

Definition at line 322 of file FdCache.C.

References FdCache::PartialCache::tryopen().

void* JanitorThread void *  arg  ) 
 

Definition at line 151 of file FdCache.C.

References FdCache::PartialCache::janitor_sweep().


Generated on Mon May 8 00:49:03 2006 for Vesta by  doxygen 1.4.2