XrdOfsHandle Class Reference

#include <XrdOfsHandle.hh>

List of all members.

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)
XrdOssDFSelect (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
XrdOssDFssi
XrdOfsHandleNext
XrdOfsHanKey Path
XrdOfsHanPscPosc

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 XrdOssDFossDF
static XrdOfsHandleFree

Friends

class XrdOfsHanTab
class XrdOfsHanXpr


Detailed Description

Definition at line 105 of file XrdOfsHandle.hh.


Constructor & Destructor Documentation

XrdOfsHandle::XrdOfsHandle (  )  [inline]

Definition at line 149 of file XrdOfsHandle.hh.

XrdOfsHandle::~XrdOfsHandle (  )  [inline]

Definition at line 151 of file XrdOfsHandle.hh.

References Retire().


Member Function Documentation

void XrdOfsHandle::Activate ( XrdOssDF ssP  )  [inline]

Definition at line 116 of file XrdOfsHandle.hh.

References ssi.

int XrdOfsHandle::Alloc ( const char *  thePath,
int  Opts,
XrdOfsHandle **  Handle 
) [static]

Definition at line 168 of file XrdOfsHandle.cc.

References XrdOfsHanTab::Add(), XrdOfsStats::Add(), XrdOfsStats::Data, XrdOfsHanTab::Find(), XrdOfsHanKey::Links, XrdSysMutex::Lock(), myMutex, nolokDelay, XrdOfsStats::StatsData::numHandles, OfsStats, opRW, Path, roTable, rwTable, XrdSysMutex::UnLock(), and WaitLock().

Referenced by Alloc(), XrdOfs::ConfigPosc(), XrdOfsFile::open(), and XrdOfs::XrdOfs().

int XrdOfsHandle::Alloc ( XrdOfsHandle **  Handle  )  [static]

Definition at line 205 of file XrdOfsHandle.cc.

References Alloc(), XrdSysMutex::Lock(), myMutex, and XrdSysMutex::UnLock().

void XrdOfsHandle::Hide ( const char *  thePath  )  [static]

Definition at line 254 of file XrdOfsHandle.cc.

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]

Definition at line 126 of file XrdOfsHandle.hh.

References ossDF, and ssi.

Referenced by XrdOfsFile::close().

const char* XrdOfsHandle::Name (  )  [inline]

Definition at line 128 of file XrdOfsHandle.hh.

References Path, and XrdOfsHanKey::Val.

Referenced by XrdOfs::Emsg(), XrdOfsFile::FName(), XrdOfsFile::GenFWEvent(), XrdOfsFile::read(), XrdOfsFile::stat(), XrdOfs::Unpersist(), and XrdOfsFile::write().

int XrdOfsHandle::PoscGet ( short Mode,
int  Done = 0 
)

Definition at line 274 of file XrdOfsHandle.cc.

References XrdOfsHanKey::Links, XrdSysMutex::Lock(), XrdOfsHanPsc::Mode, myMutex, Path, Posc, XrdOfsHanPsc::Recycle(), XrdSysMutex::UnLock(), XrdOfsHanPsc::Unum, and XrdOfsHanPsc::xprP.

Referenced by XrdOfs::Unpersist().

int XrdOfsHandle::PoscSet ( const char *  User,
int  Unum,
short  Mode 
)

Definition at line 300 of file XrdOfsHandle.cc.

References XrdOfsHanPsc::Alloc(), XrdSysError::Emsg(), ETXTBSY, free(), XrdOfsHanPsc::Mode, OfsEroute, Path, Posc, retval, sprintf(), XrdOfsHanPsc::Uhst, XrdOfsHanPsc::Ulen, XrdOfsHanPsc::Unum, XrdOfsHanPsc::User, and XrdOfsHanKey::Val.

Referenced by XrdOfs::ConfigPosc().

const char * XrdOfsHandle::PoscUsr (  ) 

Definition at line 351 of file XrdOfsHandle.cc.

References Posc, and XrdOfsHanPsc::User.

Referenced by XrdOfs::Unpersist().

int XrdOfsHandle::Retire ( long long retsz = 0,
char *  buff = 0,
int  blen = 0 
)

Definition at line 363 of file XrdOfsHandle.cc.

References XrdOssDF::Close(), XrdOfsStats::Data, XrdOfsStats::Dec(), XrdSysError::Emsg(), Free, free(), isRW, XrdOfsHanKey::Len, XrdOfsHanKey::Links, XrdSysMutex::Lock(), myMutex, Next, XrdOfsStats::StatsData::numHandles, OfsEroute, OfsStats, ossDF, Path, Posc, XrdOfsHanPsc::Recycle(), XrdOfsHanTab::Remove(), roTable, rwTable, ssi, strlcpy(), XrdSysMutex::UnLock(), UnLock(), and XrdOfsHanKey::Val.

Referenced by XrdOfs::ConfigPosc(), Retire(), StartXpr(), and ~XrdOfsHandle().

int XrdOfsHandle::Retire ( XrdOfsHanCB ,
int  DSec 
)

Definition at line 391 of file XrdOfsHandle.cc.

References XrdOfsHanXpr::add2Q(), XrdSysError::Emsg(), XrdOfsHanKey::Links, XrdSysMutex::Lock(), myMutex, OfsEroute, Path, Posc, Retire(), XrdOfsHanCB::Retired(), XrdOfsHanXpr::Set(), StartXpr(), XrdSysMutex::UnLock(), UnLock(), XrdOfsHanKey::Val, XrdOfsHanPsc::xprP, and XrdOfsHanXpr.

XrdOssDF& XrdOfsHandle::Select ( void   )  [inline]

Definition at line 140 of file XrdOfsHandle.hh.

References ssi.

Referenced by XrdOfsFile::fctl(), XrdOfsFile::getCXinfo(), XrdOfsFile::getMmap(), XrdOfsFile::read(), XrdOfsFile::stat(), XrdOfsFile::sync(), XrdOfsFile::truncate(), and XrdOfsFile::write().

int XrdOfsHandle::StartXpr ( int  Init = 0  )  [static]

Definition at line 423 of file XrdOfsHandle.cc.

References XrdOfsHanXpr::Call, XrdSysError::Emsg(), XrdOfsHanXpr::Get(), XrdOfsHanXpr::Handle, XrdOfsHanKey::Links, XrdSysMutex::Lock(), myMutex, OfsEroute, Path, Posc, Retire(), XrdOfsHanCB::Retired(), XrdSysThread::Run(), XrdSysMutex::UnLock(), UnLock(), XrdOfsHanKey::Val, XrdOfsHanPsc::xprP, and XrdOfsHanXpire().

Referenced by Retire(), and XrdOfsHanXpire().

int XrdOfsHandle::Usage (  )  [inline]

Definition at line 144 of file XrdOfsHandle.hh.

References XrdOfsHanKey::Links, and Path.

Referenced by XrdOfsFile::close(), and XrdOfsFile::open().

void XrdOfsHandle::Lock (  )  [inline]

Definition at line 146 of file XrdOfsHandle.hh.

References hMutex, and XrdSysMutex::Lock().

Referenced by Alloc(), XrdOfs::Emsg(), XrdOfsFile::GenFWEvent(), and XrdOfsFile::sync().

void XrdOfsHandle::UnLock ( void   )  [inline]

Definition at line 147 of file XrdOfsHandle.hh.

References hMutex, and XrdSysMutex::UnLock().

Referenced by XrdOfs::Emsg(), XrdOfsFile::GenFWEvent(), Retire(), StartXpr(), and XrdOfsFile::sync().

int XrdOfsHandle::Alloc ( XrdOfsHanKey  ,
int  Opts,
XrdOfsHandle **  Handle 
) [static, private]

Definition at line 221 of file XrdOfsHandle.cc.

References Free, i, isChanged, isCompressed, isPending, isRW, XrdOfsHanKey::Links, Lock(), Next, nomemDelay, opPC, ossDF, Path, Posc, and ssi.

int XrdOfsHandle::WaitLock ( void   )  [private]

Definition at line 483 of file XrdOfsHandle.cc.

References XrdSysMutex::CondLock(), hMutex, LockTries, LockWait, and XrdSysTimer::Wait().

Referenced by Alloc(), and XrdOfsHanXpr::Get().


Friends And Related Function Documentation

friend class XrdOfsHanTab [friend]

Definition at line 107 of file XrdOfsHandle.hh.

friend class XrdOfsHanXpr [friend]

Definition at line 108 of file XrdOfsHandle.hh.

Referenced by Retire().


Member Data Documentation

char XrdOfsHandle::isPending

Definition at line 111 of file XrdOfsHandle.hh.

Referenced by Alloc(), XrdOfsFile::sync(), XrdOfsFile::truncate(), and XrdOfsFile::write().

char XrdOfsHandle::isChanged

Definition at line 112 of file XrdOfsHandle.hh.

Referenced by Alloc(), XrdOfsFile::GenFWEvent(), XrdOfsFile::truncate(), and XrdOfsFile::write().

char XrdOfsHandle::isCompressed

Definition at line 113 of file XrdOfsHandle.hh.

Referenced by Alloc(), XrdOfsFile::open(), and XrdOfsFile::read().

char XrdOfsHandle::isRW

Definition at line 114 of file XrdOfsHandle.hh.

Referenced by Alloc(), XrdOfs::Emsg(), Retire(), and XrdOfsFile::write().

const int XrdOfsHandle::opRW = 1 [static]

Definition at line 118 of file XrdOfsHandle.hh.

Referenced by Alloc(), and XrdOfsFile::open().

const int XrdOfsHandle::opPC = 3 [static]

Definition at line 119 of file XrdOfsHandle.hh.

Referenced by Alloc(), XrdOfsFile::close(), XrdOfs::ConfigPosc(), XrdOfs::Emsg(), XrdOfsFile::open(), and XrdOfsFile::write().

const int XrdOfsHandle::LockTries = 3 [static, private]

Definition at line 157 of file XrdOfsHandle.hh.

Referenced by WaitLock().

const int XrdOfsHandle::LockWait = 333 [static, private]

Definition at line 158 of file XrdOfsHandle.hh.

Referenced by WaitLock().

const int XrdOfsHandle::nolokDelay = 3 [static, private]

Definition at line 159 of file XrdOfsHandle.hh.

Referenced by Alloc().

const int XrdOfsHandle::nomemDelay = 15 [static, private]

Definition at line 160 of file XrdOfsHandle.hh.

Referenced by Alloc().

XrdSysMutex XrdOfsHandle::myMutex [static, private]

Definition at line 162 of file XrdOfsHandle.hh.

Referenced by Alloc(), Hide(), PoscGet(), Retire(), and StartXpr().

XrdOfsHanTab XrdOfsHandle::roTable [static, private]

Definition at line 163 of file XrdOfsHandle.hh.

Referenced by Alloc(), Hide(), and Retire().

XrdOfsHanTab XrdOfsHandle::rwTable [static, private]

Definition at line 164 of file XrdOfsHandle.hh.

Referenced by Alloc(), Hide(), and Retire().

XrdOssDF * XrdOfsHandle::ossDF [static, private]

Definition at line 165 of file XrdOfsHandle.hh.

Referenced by Alloc(), Inactive(), and Retire().

XrdOfsHandle * XrdOfsHandle::Free [static, private]

Definition at line 166 of file XrdOfsHandle.hh.

Referenced by Alloc(), and Retire().

XrdSysMutex XrdOfsHandle::hMutex [private]

Definition at line 168 of file XrdOfsHandle.hh.

Referenced by Lock(), UnLock(), and WaitLock().

XrdOssDF* XrdOfsHandle::ssi [private]

Definition at line 169 of file XrdOfsHandle.hh.

Referenced by Activate(), Alloc(), Inactive(), Retire(), and Select().

XrdOfsHandle* XrdOfsHandle::Next [private]

Definition at line 170 of file XrdOfsHandle.hh.

Referenced by XrdOfsHanTab::Add(), Alloc(), XrdOfsHanTab::Expand(), XrdOfsHanTab::Find(), XrdOfsHanTab::Remove(), and Retire().

XrdOfsHanKey XrdOfsHandle::Path [private]

Definition at line 171 of file XrdOfsHandle.hh.

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]

Definition at line 172 of file XrdOfsHandle.hh.

Referenced by Alloc(), PoscGet(), PoscSet(), PoscUsr(), Retire(), and StartXpr().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1