XrdFileCache::IOEntireFile Class Reference

Downloads original file into a single file on local disk. Handles read requests as they come along. More...

#include <XrdFileCacheIOEntireFile.hh>

Inheritance diagram for XrdFileCache::IOEntireFile:
Inheritance graph
[legend]
Collaboration diagram for XrdFileCache::IOEntireFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IOEntireFile (XrdOucCacheIO2 *io, XrdOucCacheStats &stats, Cache &cache)
 Constructor.
 ~IOEntireFile ()
 Destructor.
bool HasFile () const
 Check if File was opened successfully.
virtual int Read (char *Buffer, long long Offset, int Length)
virtual int ReadV (const XrdOucIOVec *readV, int n)
virtual XrdOucCacheIODetach ()
virtual bool ioActive ()
 Virtual method of XrdOucCacheIO. Called to check if destruction needs to be done in a separate task.
virtual int Fstat (struct stat &sbuff)
virtual long long FSize ()

Private Member Functions

int initCachedStat (const char *path)

Private Attributes

XrdSysMutex m_mutex
Filem_file
struct stat * m_localStat

Detailed Description

Downloads original file into a single file on local disk. Handles read requests as they come along.


Constructor & Destructor Documentation

XrdFileCache::IOEntireFile::IOEntireFile ( XrdOucCacheIO2 io,
XrdOucCacheStats stats,
Cache cache 
)

Constructor.

XrdFileCache::IOEntireFile::~IOEntireFile (  ) 

Destructor.


Member Function Documentation

virtual XrdOucCacheIO* XrdFileCache::IOEntireFile::Detach (  )  [virtual]

Detach itself from Cache. Note: this will delete the object.

Returns:
original source XrdPosixFile

Reimplemented from XrdOucCacheIO.

virtual long long XrdFileCache::IOEntireFile::FSize (  )  [virtual]

Implements XrdOucCacheIO.

virtual int XrdFileCache::IOEntireFile::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.

bool XrdFileCache::IOEntireFile::HasFile (  )  const [inline]

Check if File was opened successfully.

References m_file.

int XrdFileCache::IOEntireFile::initCachedStat ( const char *  path  )  [private]
virtual bool XrdFileCache::IOEntireFile::ioActive (  )  [virtual]

Virtual method of XrdOucCacheIO. Called to check if destruction needs to be done in a separate task.

Reimplemented from XrdOucCacheIO.

virtual int XrdFileCache::IOEntireFile::Read ( char *  Buffer,
long long  Offset,
int  Length 
) [virtual]

Implements XrdOucCacheIO.

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

Reimplemented from XrdOucCacheIO.


Member Data Documentation

Referenced by HasFile().

struct stat* XrdFileCache::IOEntireFile::m_localStat [read, private]

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

Generated on 8 May 2020 for xrootd by  doxygen 1.6.1