xrootd
|
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 <XrdPfcIOFileBlock.hh>
Public Member Functions | |
IOFileBlock (XrdOucCacheIO *io, Cache &cache) | |
~IOFileBlock () | |
bool | ioActive () |
Abstract virtual method of XrdPfcIO Called to check if destruction needs to be done in a separate task. More... | |
void | DetachFinalize () |
Abstract virtual method of XrdPfcIO Called to destruct the IO object after it is no longer used. More... | |
virtual int | Read (char *Buffer, long long Offset, int Length) |
virtual int | Fstat (struct stat &sbuff) |
virtual long long | FSize () |
virtual void | Update (XrdOucCacheIO &iocp) |
![]() | |
IO (XrdOucCacheIO *io, Cache &cache) | |
virtual XrdOucCacheIO * | Base () |
Original data source. 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) |
bool | Detach (XrdOucCacheIOCD &iocdP) |
const char * | GetLocation () |
XrdSysTrace * | GetTrace () |
XrdOucCacheIO * | GetInput () |
![]() | |
virtual const char * | Location (bool refresh=false) |
virtual int | pgRead (char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) |
virtual void | pgRead (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) |
virtual int | pgWrite (char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) |
virtual void | pgWrite (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) |
virtual void | Preread (long long offs, int rlen, int opts=0) |
virtual void | Preread (aprParms &Parms) |
virtual void | Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen) |
virtual int | ReadV (const XrdOucIOVec *readV, int rnum) |
virtual void | ReadV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int rnum) |
virtual void | Sync (XrdOucCacheIOCB &iocb) |
virtual void | Trunc (XrdOucCacheIOCB &iocb, long long offs) |
virtual void | Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen) |
virtual int | WriteV (const XrdOucIOVec *writV, int wnum) |
virtual void | WriteV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *writV, int wnum) |
XrdOucCacheIO () | |
Construct and Destructor. More... | |
Private Member Functions | |
void | GetBlockSizeFromPath () |
int | initLocalStat () |
File * | newBlockFile (long long off, int blocksize) |
void | CloseInfoFile () |
Private Attributes | |
long long | m_blocksize |
size of file-block More... | |
std::map< int, File * > | m_blocks |
map of created blocks More... | |
XrdSysMutex | m_mutex |
map mutex More... | |
struct stat * | m_localStat |
Info | m_info |
XrdOssDF * | m_info_file |
Additional Inherited Members | |
![]() | |
static const uint64_t | forceCS = 0x0000000000000001ULL |
static const int | SingleUse = 0x0001 |
Mark pages for single use. More... | |
![]() | |
const char * | GetPath () |
std::string | GetFilename () |
const char * | RefreshLocation () |
![]() | |
virtual | ~XrdOucCacheIO () |
![]() | |
Cache & | m_cache |
reference to Cache needed in detach More... | |
const char * | m_traceID |
Downloads original file into multiple files, chunked into blocks. Only blocks that are asked for are downloaded. Handles read requests as they come along.
XrdPfc::IOFileBlock::IOFileBlock | ( | XrdOucCacheIO * | io, |
Cache & | cache | ||
) |
XrdPfc::IOFileBlock::~IOFileBlock | ( | ) |
|
private |
|
virtual |
Abstract virtual method of XrdPfcIO Called to destruct the IO object after it is no longer used.
Implements XrdPfc::IO.
|
virtual |
|
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 XrdOucCacheIO.
|
private |
|
private |
|
virtual |
Abstract virtual method of XrdPfcIO Called to check if destruction needs to be done in a separate task.
Implements XrdPfc::IO.
|
private |
|
virtual |
Perform an synchronous read.
buff | pointer to the buffer to receive the results. The buffer must remain valid until the callback is invoked. |
offs | the offset into the file. |
rlen | the number of bytes to read. |
Implements XrdOucCacheIO.
|
virtual |
Update the originally passed XrdOucCacheIO object with the object passed. All future uses underlying XrdOucCacheIO object must now use this object. Update() is called when Prepare() indicated that the file should not be physically opened and a file method was invoked in the XrdOucCacheIO passed to Attach(). When this occurs, the file is actually opened and Update() called to replace the original XrdOucCacheIO object with one that uses the newly opened file.
iocp | reference to the new XrdOucCacheIO object. |
Reimplemented from XrdPfc::IO.
|
private |
map of created blocks
|
private |
size of file-block
|
private |
|
private |
|
private |
|
private |
map mutex