![]() |
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. More... | |
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. More... | |
int | Sync () override |
virtual int | Sync ()=0 |
virtual void | Sync (XrdOucCacheIOCB &iocb) |
virtual int | Trunc (long long offs)=0 |
int | Trunc (long long Offset) override |
virtual void | Trunc (XrdOucCacheIOCB &iocb, long long offs) |
void | Update (XrdOucCacheIO &iocp) override |
virtual int | Write (char *buff, long long offs, int wlen)=0 |
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. More... | |
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 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) |
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 More... | |
Cache & | m_cache |
reference to Cache object More... | |
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. More... | |
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.
|
inlinevirtual |
|
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 XrdOucCacheIOCD::DetachDone(), DetachFinalize(), DoIt(), ioActive(), XrdPfc::Cache::schedP, and XrdScheduler::Schedule().
|
pure virtual |
Implemented in XrdPfc::IOFileBlock, and XrdPfc::IOFile.
Referenced by Detach().
|
protected |
Definition at line 36 of file XrdPfcIO.cc.
References GetPath(), and XrdCl::URL::GetPath().
Referenced by XrdPfc::IOFile::IOFile().
XrdOucCacheIO * IO::GetInput | ( | ) |
Definition at line 31 of file XrdPfcIO.cc.
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 XrdPfc::Cache::GetTrace(), and m_cache.
|
pure virtual |
Implemented in XrdPfc::IOFileBlock, and XrdPfc::IOFile.
Referenced by Detach().
|
inlineprotected |
Definition at line 57 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFile::pgRead(), XrdPfc::IOFile::Read(), XrdPfc::IOFileBlock::Read(), 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.
|
virtual |
Perform an synchronous sync() operation.
Implements XrdOucCacheIO.
|
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. |
Implements XrdOucCacheIO.
Definition at line 380 of file XrdOucCache.hh.
virtual int XrdOucCacheIO::Trunc |
Perform an synchronous trunc() operation.
offs | the size the file is have. |
|
inlineoverridevirtual |
Perform an synchronous trunc() operation.
offs | the size the file is have. |
Implements XrdOucCacheIO.
Definition at line 30 of file XrdPfcIO.hh.
|
inline |
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. |
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::IOFileBlock, and XrdPfc::IOFile.
Definition at line 17 of file XrdPfcIO.cc.
References GetLocation(), Path(), RefreshLocation(), and TRACE_PC.
Referenced by XrdPfc::IOFile::Update(), and XrdPfc::IOFileBlock::Update().
virtual int XrdOucCacheIO::Write |
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 |
|
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.
|
inline |
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 |
Definition at line 447 of file XrdOucCache.hh.
|
friend |
Definition at line 80 of file XrdPfcIO.hh.
|
protected |
number of active read requests
Definition at line 70 of file XrdPfcIO.hh.
Referenced by XrdPfc::File::ioActive(), XrdPfc::IOFile::pgRead(), XrdPfc::IOFile::Read(), and XrdPfc::IOFile::ReadV().
|
protected |
reference to Cache object
Definition at line 50 of file XrdPfcIO.hh.
Referenced by 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.