![]() |
XRootD
|
Base cache-io class that implements some XrdOucCacheIO abstract methods. More...
#include <XrdPfcIO.hh>
Classes | |
struct | ReadReqRHCond |
Public Member Functions | |
IO (XrdOucCacheIO *io, Cache &cache) | |
virtual XrdOucCacheIO * | Base () |
Original data source. | |
bool | Detach (XrdOucCacheIOCD &iocdP) final |
virtual void | DetachFinalize ()=0 |
XrdOucCacheIO * | GetInput () |
const char * | GetLocation () |
XrdSysTrace * | GetTrace () |
virtual bool | ioActive ()=0 |
const char * | Path () override |
Original data source URL. | |
int | Sync () override |
virtual void | Sync (XrdOucCacheIOCB &iocb) |
int | Trunc (long long Offset) override |
virtual void | Trunc (XrdOucCacheIOCB &iocb, long long offs) |
void | Update (XrdOucCacheIO &iocp) override |
int | Write (char *Buffer, long long Offset, int Length) override |
virtual void | Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen) |
![]() | |
XrdOucCacheIO () | |
Construct and Destructor. | |
virtual long long | FSize ()=0 |
virtual int | Fstat (struct stat &sbuff) |
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 (aprParms &Parms) |
virtual void | Preread (long long offs, int rlen, int opts=0) |
virtual int | Read (char *buff, long long offs, int rlen)=0 |
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 int | WriteV (const XrdOucIOVec *writV, int wnum) |
virtual void | WriteV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *writV, int wnum) |
Protected Member Functions | |
std::string | GetFilename () |
const char * | GetPath () |
unsigned short | ObtainReadSid () |
const char * | RefreshLocation () |
bool | register_block_error (int res) |
bool | register_incomplete_read () |
![]() | |
virtual | ~XrdOucCacheIO () |
Protected Attributes | |
RAtomic_int | m_active_read_reqs |
number of active read requests | |
Cache & | m_cache |
reference to Cache object | |
std::map< int, int > | m_error_counts |
int | m_incomplete_count {0} |
const char * | m_traceID |
Friends | |
class | File |
Additional Inherited Members | |
![]() | |
static const uint64_t | forceCS = 0x0000000000000001ULL |
static const int | SingleUse = 0x0001 |
Mark pages for single use. | |
Base cache-io class that implements some XrdOucCacheIO abstract methods.
Definition at line 15 of file XrdPfcIO.hh.
IO::IO | ( | XrdOucCacheIO * | io, |
Cache & | cache ) |
Definition at line 7 of file XrdPfcIO.cc.
References XrdOucCacheIO::XrdOucCacheIO(), m_active_read_reqs, m_cache, and m_traceID.
Referenced by XrdPfc::IOFile::IOFile(), XrdPfc::IOFileBlock::IOFileBlock(), and Detach().
|
inlinevirtual |
Original data source.
Definition at line 21 of file XrdPfcIO.hh.
References XrdOucCacheIO::XrdOucCacheIO().
|
finalvirtual |
Detach this CacheIO object from the cache.
iocd | reference to the detach complete callback object. |
Implements XrdOucCacheIO.
Definition at line 43 of file XrdPfcIO.cc.
References IO(), XrdOucCacheIOCD::DetachDone(), DetachFinalize(), DoIt(), ioActive(), and XrdPfc::Cache::schedP.
|
pure virtual |
Implemented in XrdPfc::IOFile, and XrdPfc::IOFileBlock.
Referenced by Detach().
|
protected |
Definition at line 36 of file XrdPfcIO.cc.
References XrdCl::URL::GetPath(), and GetPath().
Referenced by XrdPfc::IOFile::IOFile().
XrdOucCacheIO * IO::GetInput | ( | ) |
Definition at line 31 of file XrdPfcIO.cc.
References XrdOucCacheIO::XrdOucCacheIO().
Referenced by XrdPfc::IOFileBlock::Read().
|
inline |
Definition at line 44 of file XrdPfcIO.hh.
Referenced by XrdPfc::File::AddIO(), XrdPfc::File::ioActive(), XrdPfc::File::ioUpdated(), and Update().
|
inlineprotected |
Definition at line 53 of file XrdPfcIO.hh.
Referenced by GetFilename().
|
inline |
Definition at line 45 of file XrdPfcIO.hh.
References m_cache.
Referenced by XrdPfc::IOFileBlock::IOFileBlock().
|
pure virtual |
Implemented in XrdPfc::IOFile, and XrdPfc::IOFileBlock.
Referenced by Detach().
|
inlineprotected |
Definition at line 57 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFile::pgRead(), XrdPfc::IOFile::Read(), XrdPfc::IOFile::Read(), XrdPfc::IOFileBlock::Read(), XrdPfc::IOFile::ReadV(), and XrdPfc::IOFile::ReadV().
|
inlineoverridevirtual |
Original data source URL.
Implements XrdOucCacheIO.
Definition at line 24 of file XrdPfcIO.hh.
Referenced by Update().
|
inlineprotected |
Definition at line 55 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFile::ioActive(), XrdPfc::IOFileBlock::ioActive(), and Update().
|
inlineprotected |
|
inlineprotected |
|
inlineoverridevirtual |
Perform an synchronous sync() operation.
Implements XrdOucCacheIO.
Definition at line 27 of file XrdPfcIO.hh.
|
inlinevirtual |
Perform an asynchronous sync() operation (defaults to synchronous).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
Reimplemented from XrdOucCacheIO.
Definition at line 380 of file XrdOucCache.hh.
|
inlineoverridevirtual |
Perform an synchronous trunc() operation.
offs | the size the file is have. |
Implements XrdOucCacheIO.
Definition at line 30 of file XrdPfcIO.hh.
|
inlinevirtual |
Perform an asynchronous trunc() operation (defaults to synchronous).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
offs | the size the file is have. |
Reimplemented from XrdOucCacheIO.
Definition at line 403 of file XrdOucCache.hh.
|
overridevirtual |
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 XrdOucCacheIO.
Reimplemented in XrdPfc::IOFile, and XrdPfc::IOFileBlock.
Definition at line 17 of file XrdPfcIO.cc.
References XrdOucCacheIO::XrdOucCacheIO(), GetLocation(), Path(), RefreshLocation(), and TRACE_PC.
Referenced by XrdPfc::IOFile::Update(), and XrdPfc::IOFileBlock::Update().
|
inlineoverridevirtual |
Perform an synchronous write.
buff | pointer to the buffer holding the contents. The buffer must remain valid until the callback is invoked. |
offs | the offset into the file. |
wlen | the number of bytes to write |
Implements XrdOucCacheIO.
Definition at line 33 of file XrdPfcIO.hh.
|
inlinevirtual |
Perform an asynchronous write (defaults to synchronous).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
buff | pointer to the buffer holding the contents. The buffer must remain valid until the callback is invoked. |
offs | the offset into the file. |
wlen | the number of bytes to write |
Reimplemented from XrdOucCacheIO.
Definition at line 447 of file XrdOucCache.hh.
|
friend |
Definition at line 80 of file XrdPfcIO.hh.
References File.
Referenced by File, and XrdPfc::IOFileBlock::Read().
|
protected |
number of active read requests
Definition at line 70 of file XrdPfcIO.hh.
Referenced by IO(), XrdPfc::File::ioActive(), XrdPfc::IOFile::pgRead(), XrdPfc::IOFile::Read(), XrdPfc::IOFile::Read(), XrdPfc::IOFile::ReadV(), and XrdPfc::IOFile::ReadV().
|
protected |
reference to Cache object
Definition at line 50 of file XrdPfcIO.hh.
Referenced by IO(), XrdPfc::IOFileBlock::DetachFinalize(), and GetTrace().
|
protected |
Definition at line 89 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFile::DetachFinalize(), and register_block_error().
|
protected |
Definition at line 88 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFile::DetachFinalize(), and register_incomplete_read().
|
protected |
Definition at line 51 of file XrdPfcIO.hh.
Referenced by IO().