XrdPosixFile Class Reference

#include <XrdPosixFile.hh>

Inheritance diagram for XrdPosixFile:
Inheritance graph
[legend]
Collaboration diagram for XrdPosixFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

long long addOffset (long long offs, int updtSz=0)
bool Close (XrdCl::XRootDStatus &Status)
bool Finalize (XrdCl::XRootDStatus *Status)
long long FSize ()
int Fstat (struct stat &buf)
const char * Location ()
void HandleResponse (XrdCl::XRootDStatus *status, XrdCl::AnyObject *response)
void isOpen ()
void updLock ()
void updUnLock ()
long long Offset ()
const char * Origin ()
const char * Path ()
int Read (char *Buff, long long Offs, int Len)
void Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen)
int ReadV (const XrdOucIOVec *readV, int n)
void ReadV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int n)
long long setOffset (long long offs)
bool Stat (XrdCl::XRootDStatus &Status, bool force=false)
int Sync ()
void Sync (XrdOucCacheIOCB &iocb)
int Trunc (long long Offset)
void UpdtSize (size_t newsz)
bool Who (XrdPosixFile **fileP)
int Write (char *Buff, long long Offs, int Len)
void Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen)
 XrdPosixFile (bool &aOK, const char *path, XrdPosixCallBack *cbP=0, int Opts=0)
 ~XrdPosixFile ()

Static Public Member Functions

static void * DelayedDestroy (void *)
static void DelayedDestroy (XrdPosixFile *fp)

Public Attributes

XrdOucCacheIO2XCio
XrdPosixPrepIOPrepIO
XrdCl::File clFile
size_t mySize
time_t myMtime
dev_t myRdev
ino_t myInode
mode_t myMode
long long currOffset
XrdPosixCallBacktheCB
XrdPosixFilenextFile
int cOpt
int numTries

Static Public Attributes

static XrdSysSemaphore ddSem
static XrdSysMutex ddMutex
static XrdPosixFileddList
static XrdPosixFileddLost
static char * sfSFX
static short sfSLN
static bool ddPosted
static int ddNum
static const int realFD = 1
static const int isStrm = 2
static const int isUpdt = 4

Private Attributes

union {
   long long   currOffset
   XrdPosixCallBack *   theCB
   XrdPosixFile *   nextFile
}; 
char * fPath
char * fOpen
char * fLoc
union {
   int   cOpt
   int   numTries
}; 
char isStream

Constructor & Destructor Documentation

XrdPosixFile::XrdPosixFile ( bool &  aOK,
const char *  path,
XrdPosixCallBack cbP = 0,
int  Opts = 0 
)
XrdPosixFile::~XrdPosixFile (  ) 

Member Function Documentation

long long XrdPosixFile::addOffset ( long long  offs,
int  updtSz = 0 
) [inline]
bool XrdPosixFile::Close ( XrdCl::XRootDStatus Status  ) 
static void XrdPosixFile::DelayedDestroy ( XrdPosixFile fp  )  [static]
static void* XrdPosixFile::DelayedDestroy ( void *   )  [static]
bool XrdPosixFile::Finalize ( XrdCl::XRootDStatus Status  ) 
long long XrdPosixFile::FSize (  )  [inline, virtual]
int XrdPosixFile::Fstat ( struct stat &  sbuff  )  [virtual]

Perform an fstat() operation (defaults to passthrough).

Parameters:
sbuff reference to the stat buffer to be filled in. Only fields st_size, st_blocks, st_mtime (st_atime and st_ctime may be set to st_mtime), st_ino, and st_mode need to be set. All other fields are preset and should not be changed.
Returns:
<0 - fstat failed, value is -errno. =0 - fstat succeeded, sbuff holds stat information. >0 - fstat could not be done, forward operation to next level.

Reimplemented from XrdOucCacheIO2.

Referenced by XrdPosixPrepIO::Fstat().

void XrdPosixFile::HandleResponse ( XrdCl::XRootDStatus status,
XrdCl::AnyObject response 
) [virtual]

Called when a response to associated request arrives or an error occurs

Parameters:
status status of the request
response an object associated with the response (request dependent)

Reimplemented from XrdCl::ResponseHandler.

void XrdPosixFile::isOpen (  ) 
const char* XrdPosixFile::Location (  )  [virtual]

Get the file's location (i.e. endpoint hostname and port)

Returns:
A pointer to the file's location. It remains valid until the file is closed. A null string means the file is not open or is unknown.

Reimplemented from XrdOucCacheIO2.

long long XrdPosixFile::Offset (  )  [inline]
const char* XrdPosixFile::Origin (  )  [inline]

References fOpen.

const char* XrdPosixFile::Path (  )  [inline, virtual]

Implements XrdOucCacheIO.

References fPath.

Referenced by XrdPosixPrepIO::Path().

void XrdPosixFile::Read ( XrdOucCacheIOCB iocb,
char *  buff,
long long  offs,
int  rlen 
) [virtual]

Reimplemented from XrdOucCacheIO2.

int XrdPosixFile::Read ( char *  Buff,
long long  Offs,
int  Len 
) [virtual]

Implements XrdOucCacheIO.

Referenced by XrdPosixPrepIO::Read().

void XrdPosixFile::ReadV ( XrdOucCacheIOCB iocb,
const XrdOucIOVec readV,
int  n 
) [virtual]

Reimplemented from XrdOucCacheIO2.

int XrdPosixFile::ReadV ( const XrdOucIOVec readV,
int  n 
) [virtual]

Reimplemented from XrdOucCacheIO.

Referenced by XrdPosixPrepIO::ReadV().

long long XrdPosixFile::setOffset ( long long  offs  )  [inline]
bool XrdPosixFile::Stat ( XrdCl::XRootDStatus Status,
bool  force = false 
)
void XrdPosixFile::Sync ( XrdOucCacheIOCB iocb  )  [virtual]

Reimplemented from XrdOucCacheIO2.

int XrdPosixFile::Sync (  )  [virtual]

Implements XrdOucCacheIO.

Referenced by XrdPosixPrepIO::Sync().

int XrdPosixFile::Trunc ( long long  Offset  )  [virtual]

Implements XrdOucCacheIO.

Referenced by XrdPosixPrepIO::Trunc().

void XrdPosixFile::updLock (  )  [inline]
void XrdPosixFile::UpdtSize ( size_t  newsz  )  [inline]
void XrdPosixFile::updUnLock (  )  [inline]
bool XrdPosixFile::Who ( XrdPosixFile **  fileP  )  [inline]
void XrdPosixFile::Write ( XrdOucCacheIOCB iocb,
char *  buff,
long long  offs,
int  wlen 
) [virtual]

Reimplemented from XrdOucCacheIO2.

int XrdPosixFile::Write ( char *  Buff,
long long  Offs,
int  Len 
) [virtual]

Implements XrdOucCacheIO.

Referenced by XrdPosixPrepIO::Write().


Member Data Documentation

union { ... } [private]
union { ... } [private]

Referenced by addOffset(), Offset(), and setOffset().

int XrdPosixFile::ddNum [static]
bool XrdPosixFile::ddPosted [static]
char* XrdPosixFile::fLoc [private]
char* XrdPosixFile::fOpen [private]

Referenced by Origin().

char* XrdPosixFile::fPath [private]

Referenced by Path().

char XrdPosixFile::isStream [private]
const int XrdPosixFile::isStrm = 2 [static]
const int XrdPosixFile::isUpdt = 4 [static]

Referenced by addOffset(), FSize(), and UpdtSize().

const int XrdPosixFile::realFD = 1 [static]
char* XrdPosixFile::sfSFX [static]
short XrdPosixFile::sfSLN [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 16 Oct 2020 for xrootd by  doxygen 1.6.1