Downloads original file into a single file on local disk. Handles read requests as they come along. More...
#include <XrdFileCacheIOEntireFile.hh>
Public Member Functions | |
IOEntireFile (XrdOucCacheIO2 *io, XrdOucCacheStats &stats, Cache &cache) | |
Constructor. | |
~IOEntireFile () | |
Destructor. | |
virtual int | Read (char *Buffer, long long Offset, int Length) |
virtual int | ReadV (const XrdOucIOVec *readV, int n) |
virtual XrdOucCacheIO * | Detach () |
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 |
File * | m_file |
struct stat * | m_localStat |
Downloads original file into a single file on local disk. Handles read requests as they come along.
XrdFileCache::IOEntireFile::IOEntireFile | ( | XrdOucCacheIO2 * | io, | |
XrdOucCacheStats & | stats, | |||
Cache & | cache | |||
) |
Constructor.
XrdFileCache::IOEntireFile::~IOEntireFile | ( | ) |
Destructor.
virtual XrdOucCacheIO* XrdFileCache::IOEntireFile::Detach | ( | ) | [virtual] |
Detach itself from Cache. Note: this will delete the object.
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).
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. |
Reimplemented from XrdOucCacheIO2.
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.
File* XrdFileCache::IOEntireFile::m_file [private] |
struct stat* XrdFileCache::IOEntireFile::m_localStat [read, private] |