XrdFileCache::IOFileBlock Class Reference

Downloads original file into multiple files, chunked into blocks. Only blocks that are asked for are downloaded. Handles read requests as they come along. More...

#include <XrdFileCacheIOFileBlock.hh>

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

List of all members.

Public Member Functions

 IOFileBlock (XrdOucCacheIO2 *io, XrdOucCacheStats &stats, Cache &cache)
 Constructor.
 ~IOFileBlock ()
 Destructor.
virtual XrdOucCacheIODetach ()
virtual int Read (char *Buffer, long long Offset, int Length)
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

void GetBlockSizeFromPath ()
int initLocalStat ()
FilenewBlockFile (long long off, int blocksize)
void CloseInfoFile ()

Private Attributes

long long m_blocksize
 size of file-block
std::map< int, File * > m_blocks
 map of created blocks
XrdSysMutex m_mutex
 map mutex
struct stat * m_localStat
Info m_info
XrdOssDFm_infoFile

Detailed Description

Downloads original file into multiple files, chunked into blocks. Only blocks that are asked for are downloaded. Handles read requests as they come along.


Constructor & Destructor Documentation

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

Constructor.

XrdFileCache::IOFileBlock::~IOFileBlock (  ) 

Destructor.


Member Function Documentation

void XrdFileCache::IOFileBlock::CloseInfoFile (  )  [private]
virtual XrdOucCacheIO* XrdFileCache::IOFileBlock::Detach (  )  [virtual]

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

Returns:
original source XrdPosixFile

Reimplemented from XrdOucCacheIO.

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

Implements XrdOucCacheIO.

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

void XrdFileCache::IOFileBlock::GetBlockSizeFromPath (  )  [private]
int XrdFileCache::IOFileBlock::initLocalStat (  )  [private]
virtual bool XrdFileCache::IOFileBlock::ioActive (  )  [virtual]

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

Reimplemented from XrdOucCacheIO.

File* XrdFileCache::IOFileBlock::newBlockFile ( long long  off,
int  blocksize 
) [private]
virtual int XrdFileCache::IOFileBlock::Read ( char *  Buffer,
long long  Offset,
int  Length 
) [virtual]

Implements XrdOucCacheIO.


Member Data Documentation

std::map<int, File*> XrdFileCache::IOFileBlock::m_blocks [private]

map of created blocks

size of file-block

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

map mutex


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

Generated on 3 Feb 2020 for xrootd by  doxygen 1.6.1