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>
Public Member Functions | |
IOFileBlock (XrdOucCacheIO &io, XrdOucCacheStats &stats, Cache &cache) | |
Constructor. | |
~IOFileBlock () | |
Destructor. | |
virtual XrdOucCacheIO * | Detach () |
virtual int | Read (char *Buffer, long long Offset, int Length) |
Pass Read request to the corresponding Prefetch object. | |
virtual bool | ioActive () |
Virtual method of XrdOucCacheIO. Called to check if destruction needs to be done in a separate task. | |
Private Member Functions | |
void | GetBlockSizeFromPath () |
Prefetch * | newBlockPrefetcher (long long off, int blocksize, XrdOucCacheIO *io) |
Private Attributes | |
long long | m_blocksize |
size of file-block | |
std::map< int, Prefetch * > | m_blocks |
map of created blocks | |
XrdSysMutex | m_mutex |
map mutex |
Downloads original file into multiple files, chunked into blocks. Only blocks that are asked for are downloaded. Handles read requests as they come along.
XrdFileCache::IOFileBlock::IOFileBlock | ( | XrdOucCacheIO & | io, | |
XrdOucCacheStats & | stats, | |||
Cache & | cache | |||
) |
Constructor.
XrdFileCache::IOFileBlock::~IOFileBlock | ( | ) | [inline] |
Destructor.
virtual XrdOucCacheIO* XrdFileCache::IOFileBlock::Detach | ( | ) | [virtual] |
Detach from Cache. Note: this will delete the object.
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.
std::map<int, Prefetch*> XrdFileCache::IOFileBlock::m_blocks [private] |
map of created blocks
long long XrdFileCache::IOFileBlock::m_blocksize [private] |
size of file-block
map mutex