xrootd
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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]

Public Member Functions

 IOFileBlock (XrdOucCacheIO &io, XrdOucCacheStats &stats, Cache &cache)
 Constructor. More...
 
 ~IOFileBlock ()
 Destructor. More...
 
virtual XrdOucCacheIODetach ()
 
virtual int Read (char *Buffer, long long Offset, int Length)
 Pass Read request to the corresponding Prefetch object. More...
 
virtual bool ioActive ()
 Virtual method of XrdOucCacheIO. Called to check if destruction needs to be done in a separate task. More...
 
- Public Member Functions inherited from XrdFileCache::IO
 IO (XrdOucCacheIO &io, XrdOucCacheStats &stats, Cache &cache)
 
virtual XrdOucCacheIOBase ()
 Original data source. More...
 
virtual long long FSize ()
 Original data source URL. More...
 
virtual const char * Path ()
 Original data source URL. More...
 
virtual int Sync ()
 
virtual int Trunc (long long Offset)
 
virtual int Write (char *Buffer, long long Offset, int Length)
 
virtual void StartPrefetch ()
 
- Public Member Functions inherited from XrdOucCacheIO
virtual int ReadV (const XrdOucIOVec *readV, int n)
 
virtual void Preread (long long Offset, int Length, int Opts=0)
 
virtual void Preread (aprParms &Parms)
 
virtual ~XrdOucCacheIO ()
 

Private Member Functions

void GetBlockSizeFromPath ()
 
PrefetchnewBlockPrefetcher (long long off, int blocksize, XrdOucCacheIO *io)
 

Private Attributes

long long m_blocksize
 size of file-block More...
 
std::map< int, Prefetch * > m_blocks
 map of created blocks More...
 
XrdSysMutex m_mutex
 map mutex More...
 

Additional Inherited Members

- Public Attributes inherited from XrdOucCacheIO
XrdOucCacheStats Statistics
 
- Static Public Attributes inherited from XrdOucCacheIO
static const int SingleUse = 0x0001
 
- Protected Member Functions inherited from XrdFileCache::IO
XrdCl::Log * clLog () const
 
- Protected Attributes inherited from XrdFileCache::IO
XrdOucCacheIOm_io
 original data source More...
 
XrdOucCacheStatsm_statsGlobal
 reference to Cache statistics More...
 
Cachem_cache
 reference to Cache needed in detach More...
 

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 ( XrdOucCacheIO io,
XrdOucCacheStats stats,
Cache cache 
)

Constructor.

XrdFileCache::IOFileBlock::~IOFileBlock ( )
inline

Destructor.

Member Function Documentation

virtual XrdOucCacheIO* XrdFileCache::IOFileBlock::Detach ( )
virtual

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

Returns
original source XrdPosixFile

Reimplemented from XrdOucCacheIO.

void XrdFileCache::IOFileBlock::GetBlockSizeFromPath ( )
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.

Prefetch* XrdFileCache::IOFileBlock::newBlockPrefetcher ( long long  off,
int  blocksize,
XrdOucCacheIO io 
)
private
virtual int XrdFileCache::IOFileBlock::Read ( char *  Buffer,
long long  Offset,
int  Length 
)
virtual

Pass Read request to the corresponding Prefetch object.

Implements XrdOucCacheIO.

Member Data Documentation

std::map<int, Prefetch*> XrdFileCache::IOFileBlock::m_blocks
private

map of created blocks

long long XrdFileCache::IOFileBlock::m_blocksize
private

size of file-block

XrdSysMutex XrdFileCache::IOFileBlock::m_mutex
private

map mutex


The documentation for this class was generated from the following file: