CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FdRefcountMgr Class Reference

#include <fd_refcount_mgr.h>

Collaboration diagram for FdRefcountMgr:

Classes

struct  FdRefcountInfo
 

Public Member Functions

 FdRefcountMgr ()
 
 ~FdRefcountMgr ()
 
 FdRefcountMgr (const SmallHashDynamic< int, FdRefcountInfo > &map_refcount, const SmallHashDynamic< shash::Any, int > &map_fd)
 
void AssignFrom (FdRefcountMgr *other)
 
SmallHashDynamic< int,
FdRefcountInfo > * 
GetRefcountMapPtr ()
 
SmallHashDynamic< shash::Any,
int > * 
GetFdMapPtr ()
 
int Open (const shash::Any id, const std::string &path)
 
int Close (int fd)
 
int Dup (int fd)
 
FdRefcountMgrClone ()
 

Private Attributes

SmallHashDynamic< int,
FdRefcountInfo
map_refcount_
 
SmallHashDynamic< shash::Any, int > map_fd_
 
pthread_mutex_t * lock_cache_refcount_
 

Detailed Description

Definition at line 25 of file fd_refcount_mgr.h.

Constructor & Destructor Documentation

FdRefcountMgr::FdRefcountMgr ( )

Definition at line 106 of file fd_refcount_mgr.cc.

Referenced by Clone().

Here is the call graph for this function:

Here is the caller graph for this function:

FdRefcountMgr::~FdRefcountMgr ( )

Definition at line 101 of file fd_refcount_mgr.cc.

FdRefcountMgr::FdRefcountMgr ( const SmallHashDynamic< int, FdRefcountInfo > &  map_refcount,
const SmallHashDynamic< shash::Any, int > &  map_fd 
)

Definition at line 116 of file fd_refcount_mgr.cc.

Here is the call graph for this function:

Member Function Documentation

void FdRefcountMgr::AssignFrom ( FdRefcountMgr other)

Definition at line 96 of file fd_refcount_mgr.cc.

Here is the call graph for this function:

FdRefcountMgr * FdRefcountMgr::Clone ( )

Definition at line 82 of file fd_refcount_mgr.cc.

Here is the call graph for this function:

int FdRefcountMgr::Close ( int  fd)

Definition at line 38 of file fd_refcount_mgr.cc.

Here is the call graph for this function:

int FdRefcountMgr::Dup ( int  fd)

Definition at line 63 of file fd_refcount_mgr.cc.

Here is the call graph for this function:

SmallHashDynamic< shash::Any, int > * FdRefcountMgr::GetFdMapPtr ( )

Definition at line 87 of file fd_refcount_mgr.cc.

Referenced by AssignFrom().

Here is the caller graph for this function:

SmallHashDynamic< int, FdRefcountMgr::FdRefcountInfo > * FdRefcountMgr::GetRefcountMapPtr ( )

Definition at line 92 of file fd_refcount_mgr.cc.

Referenced by AssignFrom().

Here is the caller graph for this function:

int FdRefcountMgr::Open ( const shash::Any  id,
const std::string &  path 
)

This file is part of the CernVM File System.

Definition at line 16 of file fd_refcount_mgr.cc.

Here is the call graph for this function:

Member Data Documentation

pthread_mutex_t* FdRefcountMgr::lock_cache_refcount_
private

Definition at line 72 of file fd_refcount_mgr.h.

Referenced by Close(), Dup(), FdRefcountMgr(), Open(), and ~FdRefcountMgr().

SmallHashDynamic<shash::Any, int> FdRefcountMgr::map_fd_
private

map for object id -> fd lookups, used when opening files in the cache. The fd is used as key in the refcount map.

Definition at line 71 of file fd_refcount_mgr.h.

Referenced by AssignFrom(), Clone(), Close(), FdRefcountMgr(), GetFdMapPtr(), and Open().

SmallHashDynamic<int, FdRefcountInfo> FdRefcountMgr::map_refcount_
private

map for fd -> refcount lookups. A backreference to the object id is included in FdRefcountInfo in order to be able to remove the file descriptor from map_fd_.

Definition at line 65 of file fd_refcount_mgr.h.

Referenced by AssignFrom(), Clone(), Close(), Dup(), FdRefcountMgr(), GetRefcountMapPtr(), and Open().


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