![]() |
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 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. | |
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 () |
![]() | |
virtual | ~XrdOucCacheIO () |
Protected Attributes | |
RAtomic_int | m_active_read_reqs |
number of active read requests | |
Cache & | m_cache |
reference to Cache object | |
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 17 of file XrdPfcIO.hh.
IO::IO | ( | XrdOucCacheIO * | io, |
Cache & | cache | ||
) |
Definition at line 6 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 37 of file XrdPfcIO.cc.
References XrdOucCacheIOCD::DetachDone(), DetachFinalize(), DoIt(), ioActive(), XrdPfc::Cache::schedP, and XrdScheduler::Schedule().
|
pure virtual |
Implemented in XrdPfc::IOFile, and XrdPfc::IOFileBlock.
Referenced by Detach().
|
inlineprotected |
Definition at line 56 of file XrdPfcIO.hh.
References GetPath(), and XrdCl::URL::GetPath().
Referenced by XrdPfc::IOFile::IOFile().
XrdOucCacheIO * IO::GetInput | ( | ) |
Definition at line 30 of file XrdPfcIO.cc.
Referenced by XrdPfc::IOFileBlock::Read().
|
inline |
Definition at line 46 of file XrdPfcIO.hh.
Referenced by XrdPfc::File::AddIO(), XrdPfc::File::ioActive(), XrdPfc::File::ioUpdated(), and Update().
|
inlineprotected |
Definition at line 55 of file XrdPfcIO.hh.
Referenced by GetFilename().
|
inline |
Definition at line 47 of file XrdPfcIO.hh.
References XrdPfc::Cache::GetTrace(), and m_cache.
|
pure virtual |
Implemented in XrdPfc::IOFile, and XrdPfc::IOFileBlock.
Referenced by Detach().
|
inlineprotected |
Definition at line 59 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFile::pgRead(), XrdPfc::IOFile::Read(), XrdPfc::IOFileBlock::Read(), XrdPfc::IOFile::Read(), XrdPfc::IOFile::ReadV(), and XrdPfc::IOFile::ReadV().
|
inlineoverridevirtual |
Original data source URL.
Implements XrdOucCacheIO.
Definition at line 26 of file XrdPfcIO.hh.
Referenced by Update().
|
inlineprotected |
Definition at line 57 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFile::ioActive(), XrdPfc::IOFileBlock::ioActive(), and Update().
|
inlineoverridevirtual |
Perform an synchronous sync() operation.
Implements XrdOucCacheIO.
Definition at line 29 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. |
Reimplemented from XrdOucCacheIO.
Definition at line 380 of file XrdOucCache.hh.
|
virtual |
Perform an synchronous trunc() operation.
offs | the size the file is have. |
Implements XrdOucCacheIO.
|
inlineoverridevirtual |
Perform an synchronous trunc() operation.
offs | the size the file is have. |
Implements XrdOucCacheIO.
Definition at line 32 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 16 of file XrdPfcIO.cc.
References GetLocation(), Path(), RefreshLocation(), and TRACE_PC.
Referenced by XrdPfc::IOFile::Update(), and XrdPfc::IOFileBlock::Update().
|
virtual |
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.
|
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 35 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 82 of file XrdPfcIO.hh.
|
protected |
number of active read requests
Definition at line 72 of file XrdPfcIO.hh.
Referenced by 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 52 of file XrdPfcIO.hh.
Referenced by XrdPfc::IOFileBlock::DetachFinalize(), and GetTrace().
|
protected |
Definition at line 53 of file XrdPfcIO.hh.