CernVM-FS
2.12.0
|
#include <fd_refcount_mgr.h>
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) |
FdRefcountMgr * | Clone () |
Private Attributes | |
SmallHashDynamic< int, FdRefcountInfo > | map_refcount_ |
SmallHashDynamic< shash::Any, int > | map_fd_ |
pthread_mutex_t * | lock_cache_refcount_ |
Definition at line 25 of file fd_refcount_mgr.h.
FdRefcountMgr::FdRefcountMgr | ( | ) |
Definition at line 106 of file fd_refcount_mgr.cc.
Referenced by Clone().
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 | ||
) |
void FdRefcountMgr::AssignFrom | ( | FdRefcountMgr * | other | ) |
FdRefcountMgr * FdRefcountMgr::Clone | ( | ) |
int FdRefcountMgr::Close | ( | int | fd | ) |
int FdRefcountMgr::Dup | ( | int | fd | ) |
SmallHashDynamic< shash::Any, int > * FdRefcountMgr::GetFdMapPtr | ( | ) |
Definition at line 87 of file fd_refcount_mgr.cc.
Referenced by AssignFrom().
SmallHashDynamic< int, FdRefcountMgr::FdRefcountInfo > * FdRefcountMgr::GetRefcountMapPtr | ( | ) |
Definition at line 92 of file fd_refcount_mgr.cc.
Referenced by AssignFrom().
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.
|
private |
Definition at line 72 of file fd_refcount_mgr.h.
Referenced by Close(), Dup(), FdRefcountMgr(), Open(), and ~FdRefcountMgr().
|
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().
|
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().