xrootd
|
#include <XrdOfsHandle.hh>
Public Member Functions | |
void | Activate (XrdOssDF *ssP) |
int | Inactive () |
const char * | Name () |
int | PoscGet (short &Mode, int Done=0) |
int | PoscSet (const char *User, int Unum, short Mode) |
const char * | PoscUsr () |
int | Retire (long long *retsz=0, char *buff=0, int blen=0) |
int | Retire (XrdOfsHanCB *, int DSec) |
XrdOssDF & | Select (void) |
int | Usage () |
void | Lock () |
void | UnLock () |
XrdOfsHandle () | |
~XrdOfsHandle () | |
Static Public Member Functions | |
static int | Alloc (const char *thePath, int Opts, XrdOfsHandle **Handle) |
static int | Alloc (XrdOfsHandle **Handle) |
static void | Hide (const char *thePath) |
static int | StartXpr (int Init=0) |
Public Attributes | |
char | isPending |
char | isChanged |
char | isCompressed |
char | isRW |
Static Public Attributes | |
static const int | opRW = 1 |
static const int | opPC = 3 |
Private Member Functions | |
int | WaitLock (void) |
Static Private Member Functions | |
static int | Alloc (XrdOfsHanKey, int Opts, XrdOfsHandle **Handle) |
Private Attributes | |
XrdSysMutex | hMutex |
XrdOssDF * | ssi |
XrdOfsHandle * | Next |
XrdOfsHanKey | Path |
XrdOfsHanPsc * | Posc |
Static Private Attributes | |
static const int | LockTries = 3 |
static const int | LockWait = 333 |
static const int | nolokDelay = 3 |
static const int | nomemDelay = 15 |
static XrdSysMutex | myMutex |
static XrdOfsHanTab | roTable |
static XrdOfsHanTab | rwTable |
static XrdOssDF * | ossDF = (XrdOssDF *)new XrdOfsHanOss |
static XrdOfsHandle * | Free = 0 |
Friends | |
class | XrdOfsHanTab |
class | XrdOfsHanXpr |
XrdOfsHandle::XrdOfsHandle | ( | ) | [inline] |
Referenced by Alloc().
XrdOfsHandle::~XrdOfsHandle | ( | ) | [inline] |
References Retire().
int XrdOfsHandle::Alloc | ( | const char * | thePath, |
int | Opts, | ||
XrdOfsHandle ** | Handle | ||
) | [static] |
References XrdOfsStats::Add(), XrdOfsHanTab::Add(), XrdOfsStats::Data, XrdOfsHanTab::Find(), XrdOfsHanKey::Links, XrdSysMutex::Lock(), myMutex, nolokDelay, XrdOfsStats::StatsData::numHandles, opRW, Path, roTable, rwTable, XrdSysMutex::UnLock(), and WaitLock().
Referenced by Alloc(), XrdOfs::ConfigPosc(), XrdOfsFile::open(), PoscSet(), and XrdOfs::XrdOfs().
int XrdOfsHandle::Alloc | ( | XrdOfsHanKey | theKey, |
int | Opts, | ||
XrdOfsHandle ** | Handle | ||
) | [static, private] |
References Free, isChanged, isCompressed, isPending, isRW, XrdOfsHanKey::Links, Lock(), Next, nomemDelay, opPC, ossDF, Path, Posc, ssi, and XrdOfsHandle().
int XrdOfsHandle::Alloc | ( | XrdOfsHandle ** | Handle | ) | [static] |
References Alloc(), XrdSysMutex::Lock(), myMutex, and XrdSysMutex::UnLock().
void XrdOfsHandle::Hide | ( | const char * | thePath | ) | [static] |
References XrdOfsHanTab::Find(), XrdOfsHanKey::Len, XrdSysMutex::Lock(), myMutex, Path, roTable, rwTable, and XrdSysMutex::UnLock().
Referenced by XrdOfs::remove(), and XrdOfs::rename().
int XrdOfsHandle::Inactive | ( | ) | [inline] |
Referenced by XrdOfsFile::close().
void XrdOfsHandle::Lock | ( | ) | [inline] |
References hMutex, and XrdSysMutex::Lock().
Referenced by Alloc(), XrdOfsFile::close(), XrdOfs::Emsg(), XrdOfsFile::GenFWEvent(), and XrdOfsFile::sync().
const char* XrdOfsHandle::Name | ( | ) | [inline] |
References Path, and XrdOfsHanKey::Val.
Referenced by XrdOfsFile::close(), XrdOfs::Emsg(), XrdOfsFile::FName(), XrdOfsFile::GenFWEvent(), XrdOfsFile::read(), XrdOfsFile::stat(), XrdOfs::Unpersist(), and XrdOfsFile::write().
int XrdOfsHandle::PoscGet | ( | short & | Mode, |
int | Done = 0 |
||
) |
References XrdOfsHanKey::Links, XrdSysMutex::Lock(), XrdOfsHanPsc::Mode, myMutex, Path, Posc, XrdOfsHanPsc::Recycle(), XrdSysMutex::UnLock(), XrdOfsHanPsc::Unum, and XrdOfsHanPsc::xprP.
Referenced by XrdOfsFile::close(), and XrdOfs::Unpersist().
int XrdOfsHandle::PoscSet | ( | const char * | User, |
int | Unum, | ||
short | Mode | ||
) |
References Alloc(), XrdSysError::Emsg(), ETXTBSY, index(), XrdOfsHanPsc::Mode, Path, Posc, XrdOfsHanPsc::Uhst, XrdOfsHanPsc::Ulen, XrdOfsHanPsc::Unum, XrdOfsHanPsc::User, and XrdOfsHanKey::Val.
Referenced by XrdOfs::ConfigPosc().
const char * XrdOfsHandle::PoscUsr | ( | ) |
References Posc, and XrdOfsHanPsc::User.
Referenced by XrdOfs::Unpersist().
int XrdOfsHandle::Retire | ( | long long * | retsz = 0 , |
char * | buff = 0 , |
||
int | blen = 0 |
||
) |
References XrdOssDF::Close(), XrdOfsStats::Data, XrdOfsStats::Dec(), XrdSysError::Emsg(), Free, isRW, XrdOfsHanKey::Len, XrdOfsHanKey::Links, XrdSysMutex::Lock(), myMutex, Next, XrdOfsStats::StatsData::numHandles, ossDF, Path, Posc, XrdOfsHanPsc::Recycle(), XrdOfsHanTab::Remove(), roTable, rwTable, ssi, strlcpy(), XrdSysMutex::UnLock(), UnLock(), and XrdOfsHanKey::Val.
Referenced by XrdOfsFile::close(), XrdOfs::ConfigPosc(), Retire(), StartXpr(), and ~XrdOfsHandle().
int XrdOfsHandle::Retire | ( | XrdOfsHanCB * | cbP, |
int | DSec | ||
) |
XrdOssDF& XrdOfsHandle::Select | ( | void | ) | [inline] |
References ssi.
Referenced by XrdOfsFile::close(), XrdOfsFile::fctl(), XrdOfsFile::getCXinfo(), XrdOfsFile::getMmap(), XrdOfsFile::read(), XrdOfsFile::stat(), XrdOfsFile::sync(), XrdOfsFile::truncate(), and XrdOfsFile::write().
int XrdOfsHandle::StartXpr | ( | int | Init = 0 | ) | [static] |
References XrdOfsHanXpr::Call, XrdSysError::Emsg(), XrdOfsHanXpr::Get(), XrdOfsHanXpr::Handle, XrdOfsHanKey::Links, XrdSysMutex::Lock(), myMutex, Path, Posc, Retire(), XrdOfsHanCB::Retired(), XrdSysThread::Run(), XrdSysMutex::UnLock(), UnLock(), XrdOfsHanKey::Val, XrdOfsHanPsc::xprP, and XrdOfsHanXpire().
Referenced by Retire(), and XrdOfsHanXpire().
void XrdOfsHandle::UnLock | ( | ) | [inline] |
References hMutex, and XrdSysMutex::UnLock().
Referenced by XrdOfs::Emsg(), XrdOfsFile::GenFWEvent(), Retire(), StartXpr(), and XrdOfsFile::sync().
int XrdOfsHandle::Usage | ( | ) | [inline] |
References XrdOfsHanKey::Links, and Path.
Referenced by XrdOfsFile::close(), and XrdOfsFile::open().
int XrdOfsHandle::WaitLock | ( | void | ) | [private] |
References XrdSysMutex::CondLock(), hMutex, LockTries, LockWait, and XrdSysTimer::Wait().
Referenced by Alloc(), and XrdOfsHanXpr::Get().
friend class XrdOfsHanTab [friend] |
friend class XrdOfsHanXpr [friend] |
Referenced by Retire().
XrdOfsHandle * XrdOfsHandle::Free = 0 [static, private] |
XrdSysMutex XrdOfsHandle::hMutex [private] |
Referenced by Lock(), UnLock(), and WaitLock().
Referenced by Alloc(), XrdOfsFile::GenFWEvent(), XrdOfsFile::truncate(), and XrdOfsFile::write().
Referenced by Alloc(), XrdOfsFile::open(), and XrdOfsFile::read().
Referenced by Alloc(), XrdOfsFile::sync(), XrdOfsFile::truncate(), and XrdOfsFile::write().
char XrdOfsHandle::isRW |
Referenced by Alloc(), XrdOfsFile::close(), XrdOfs::Emsg(), Retire(), and XrdOfsFile::write().
const int XrdOfsHandle::LockTries = 3 [static, private] |
Referenced by WaitLock().
const int XrdOfsHandle::LockWait = 333 [static, private] |
Referenced by WaitLock().
XrdSysMutex XrdOfsHandle::myMutex [static, private] |
Referenced by Alloc(), Hide(), PoscGet(), Retire(), and StartXpr().
XrdOfsHandle* XrdOfsHandle::Next [private] |
Referenced by XrdOfsHanTab::Add(), Alloc(), XrdOfsHanTab::Expand(), XrdOfsHanTab::Find(), XrdOfsHanTab::Remove(), and Retire().
const int XrdOfsHandle::nolokDelay = 3 [static, private] |
Referenced by Alloc().
const int XrdOfsHandle::nomemDelay = 15 [static, private] |
Referenced by Alloc().
const int XrdOfsHandle::opPC = 3 [static] |
Referenced by Alloc(), XrdOfsFile::close(), XrdOfs::ConfigPosc(), XrdOfs::Emsg(), XrdOfsFile::open(), and XrdOfsFile::write().
const int XrdOfsHandle::opRW = 1 [static] |
Referenced by Alloc(), and XrdOfsFile::open().
XrdOssDF * XrdOfsHandle::ossDF = (XrdOssDF *)new XrdOfsHanOss [static, private] |
Referenced by Alloc(), Inactive(), and Retire().
XrdOfsHanKey XrdOfsHandle::Path [private] |
Referenced by XrdOfsHanTab::Add(), Alloc(), XrdOfsHanTab::Expand(), XrdOfsHanTab::Find(), XrdOfsHanXpr::Get(), Hide(), Name(), PoscGet(), PoscSet(), XrdOfsHanTab::Remove(), Retire(), StartXpr(), and Usage().
XrdOfsHanPsc* XrdOfsHandle::Posc [private] |
XrdOfsHanTab XrdOfsHandle::roTable [static, private] |
XrdOfsHanTab XrdOfsHandle::rwTable [static, private] |
XrdOssDF* XrdOfsHandle::ssi [private] |
Referenced by Activate(), Alloc(), Inactive(), Retire(), and Select().