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. | |
const char * | Path () override |
Original data source URL. | |
int | Sync () override |
int | Trunc (long long Offset) override |
int | Write (char *Buffer, long long Offset, int Length) override |
void | Update (XrdOucCacheIO &iocp) override |
bool | Detach (XrdOucCacheIOCD &iocdP) final |
virtual bool | ioActive ()=0 |
virtual void | DetachFinalize ()=0 |
const char * | GetLocation () |
XrdSysTrace * | GetTrace () |
XrdOucCacheIO * | GetInput () |
virtual int | Sync ()=0 |
virtual void | Sync (XrdOucCacheIOCB &iocb) |
virtual int | Trunc (long long offs)=0 |
virtual void | Trunc (XrdOucCacheIOCB &iocb, long long offs) |
virtual int | Write (char *buff, long long offs, int wlen)=0 |
virtual void | Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen) |
Public Member Functions inherited from XrdOucCacheIO | |
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 (long long offs, int rlen, int opts=0) |
virtual void | Preread (aprParms &Parms) |
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) |
XrdOucCacheIO () | |
Construct and Destructor. | |
Protected Member Functions | |
const char * | GetPath () |
std::string | GetFilename () |
const char * | RefreshLocation () |
unsigned short | ObtainReadSid () |
Protected Member Functions inherited from XrdOucCacheIO | |
virtual | ~XrdOucCacheIO () |
Protected Attributes | |
Cache & | m_cache |
reference to Cache object | |
const char * | m_traceID |
RAtomic_int | m_active_read_reqs |
number of active read requests | |
Private Member Functions | |
void | SetInput (XrdOucCacheIO *) |
Private Attributes | |
XrdSys::RAtomic< XrdOucCacheIO * > | m_io |
original data source | |
RAtomic_ushort | m_read_seqid |
sequential read id (for logging) | |
time_t | m_attach_time {0} |
int | m_active_prefetches {0} |
bool | m_allow_prefetching {true} |
bool | m_in_detach {false} |
Friends | |
class | File |
Additional Inherited Members | |
Static Public Attributes inherited from XrdOucCacheIO | |
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.
XrdPfc::IO::IO | ( | XrdOucCacheIO * | io, |
Cache & | cache | ||
) |
|
inlinevirtual |
Original data source.
References m_io.
|
finalvirtual |
Detach this CacheIO object from the cache.
iocd | reference to the detach complete callback object. |
Implements XrdOucCacheIO.
|
pure virtual |
Implemented in XrdPfc::IOFile, and XrdPfc::IOFileBlock.
|
inlineprotected |
References GetPath(), and XrdCl::URL::GetPath().
XrdOucCacheIO * XrdPfc::IO::GetInput | ( | ) |
|
inline |
References m_io.
|
inlineprotected |
References m_io.
Referenced by GetFilename().
|
inline |
References XrdPfc::Cache::GetTrace(), and m_cache.
|
pure virtual |
Implemented in XrdPfc::IOFile, and XrdPfc::IOFileBlock.
|
inlineprotected |
References m_read_seqid.
|
inlineoverridevirtual |
|
inlineprotected |
References m_io.
|
private |
|
inlineoverridevirtual |
Perform an synchronous sync() operation.
Implements XrdOucCacheIO.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
friend |
|
private |
|
protected |
number of active read requests
|
private |
|
private |
|
protected |
reference to Cache object
Referenced by GetTrace().
|
private |
|
private |
original data source
Referenced by Base(), GetLocation(), GetPath(), Path(), and RefreshLocation().
|
private |
sequential read id (for logging)
Referenced by ObtainReadSid().
|
protected |