![]() |
XRootD
|
#include <XrdSutPFCache.hh>
Public Member Functions | |
XrdSutPFCache () | |
virtual | ~XrdSutPFCache () |
XrdSutPFEntry * | Add (XrdSutPFCacheRef &urRef, const char *ID, bool force=0) |
void | Dump (const char *msg=0) |
bool | Empty () const |
int | Entries () const |
int | Flush (const char *pfname=0) |
XrdSutPFEntry * | Get (int i) const |
XrdSutPFEntry * | Get (XrdSutPFCacheRef &urRef, const char *ID, bool *wild=0) |
int | Init (int capacity=100, bool lock=1) |
int | Load (const char *pfname) |
int | Refresh () |
int | Rehash (bool force=0, bool lock=1) |
bool | Remove (const char *ID, int opt=1) |
int | Reset (int newsz=-1, bool lock=1) |
void | SetLifetime (int lifet=300) |
int | Trim (int lifet=0) |
Definition at line 71 of file XrdSutPFCache.hh.
|
inline |
Definition at line 92 of file XrdSutPFCache.hh.
|
virtual |
Definition at line 49 of file XrdSutPFCache.cc.
References XrdSysRWLock::UnLock(), and XrdSysRWLock::WriteLock().
XrdSutPFEntry * XrdSutPFCache::Add | ( | XrdSutPFCacheRef & | urRef, |
const char * | ID, | ||
bool | force = 0 |
||
) |
Definition at line 207 of file XrdSutPFCache.cc.
References DEBUG, EPNAME, ID, XrdSutPFCacheRef::Lock(), and Rehash().
void XrdSutPFCache::Dump | ( | const char * | msg = 0 | ) |
Definition at line 487 of file XrdSutPFCache.cc.
References XrdSutPFEntry::buf1, XrdSutPFEntry::buf2, XrdSutPFEntry::buf3, XrdSutPFEntry::buf4, XrdSutPFEntry::cnt, EPNAME, XrdSutPFBuf::len, XrdSutPFEntry::mtime, XrdSutPFEntry::name, PRINT, XrdSutPFEntry::status, and XrdSutTimeString().
Referenced by Get(), XrdSecProtocolpwd::Init(), and Rehash().
|
inline |
Definition at line 98 of file XrdSutPFCache.hh.
|
inline |
Definition at line 97 of file XrdSutPFCache.hh.
int XrdSutPFCache::Flush | ( | const char * | pfname = 0 | ) |
Definition at line 701 of file XrdSutPFCache.cc.
References XrdOucString::c_str(), XrdSutPFile::Close(), DEBUG, EPNAME, XrdSutPFile::IsValid(), kPFEcreate, kPFEopen, XrdSutPFile::LastErrStr(), XrdOucString::length(), XrdSutPFEntry::mtime, XrdSutPFEntry::name, XrdSutPFile::ReadEntry(), and XrdSutPFile::WriteEntry().
Referenced by XrdSecProtocolpwd::Authenticate().
|
inline |
Definition at line 110 of file XrdSutPFCache.hh.
XrdSutPFEntry * XrdSutPFCache::Get | ( | XrdSutPFCacheRef & | urRef, |
const char * | ID, | ||
bool * | wild = 0 |
||
) |
Definition at line 122 of file XrdSutPFCache.cc.
References XrdSysMutex::CondLock(), DEBUG, Dump(), EPNAME, ID, XrdSysRWLockHelper::Lock(), XrdSutPFEntry::pfeMutex, Rehash(), XrdSutPFCacheRef::Set(), TRACE, XrdSysRWLockHelper::UnLock(), and XrdSysTimer::Wait().
int XrdSutPFCache::Init | ( | int | capacity = 100 , |
bool | lock = 1 |
||
) |
Definition at line 73 of file XrdSutPFCache.cc.
References DEBUG, EPNAME, Rehash(), XrdSysRWLock::UnLock(), and XrdSysRWLock::WriteLock().
Referenced by XrdSecProtocolpwd::Init(), Load(), and Reset().
int XrdSutPFCache::Load | ( | const char * | pfname | ) |
Definition at line 531 of file XrdSutPFCache.cc.
References XrdSutPFile::Close(), DEBUG, XrdSutPFEntInd::entofs, XrdSutPFHeader::entries, EPNAME, XrdSutPFHeader::indofs, Init(), XrdSutPFile::IsValid(), kPFEopen, XrdSutPFile::LastErrStr(), XrdSutPFEntInd::name, XrdSutPFEntInd::nxtofs, Rehash(), Reset(), XrdSutPFEntry::SetName(), and stat().
Referenced by XrdSecProtocolpwd::Init(), and Refresh().
int XrdSutPFCache::Refresh | ( | ) |
Definition at line 769 of file XrdSutPFCache.cc.
References XrdOucString::c_str(), DEBUG, EPNAME, XrdOucString::length(), Load(), and stat().
int XrdSutPFCache::Rehash | ( | bool | force = 0 , |
bool | lock = 1 |
||
) |
Definition at line 659 of file XrdSutPFCache.cc.
References XrdOucHash< T >::Add(), DEBUG, Dump(), EPNAME, XrdOucHash< T >::Purge(), TRACE, XrdSysRWLock::UnLock(), and XrdSysRWLock::WriteLock().
Referenced by Add(), Get(), Init(), Load(), and Remove().
bool XrdSutPFCache::Remove | ( | const char * | ID, |
int | opt = 1 |
||
) |
Definition at line 294 of file XrdSutPFCache.cc.
References DEBUG, EPNAME, XrdOucHash< T >::Find(), ID, and Rehash().
int XrdSutPFCache::Reset | ( | int | newsz = -1 , |
bool | lock = 1 |
||
) |
Definition at line 448 of file XrdSutPFCache.cc.
References DEBUG, EPNAME, Init(), XrdSysRWLock::UnLock(), and XrdSysRWLock::WriteLock().
Referenced by Load().
|
inline |
Definition at line 107 of file XrdSutPFCache.hh.
int XrdSutPFCache::Trim | ( | int | lifet = 0 | ) |
Definition at line 410 of file XrdSutPFCache.cc.