XrdPfc::IO Class Reference

Base cache-io class that implements XrdOucCacheIO abstract methods. More...

#include <XrdPfcIO.hh>

Inheritance diagram for XrdPfc::IO:
Inheritance graph
[legend]
Collaboration diagram for XrdPfc::IO:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IO (XrdOucCacheIO *io, XrdOucCacheStats &stats, Cache &cache)
virtual XrdOucCacheIOBase ()
 Original data source.
virtual const char * Path ()
 Original data source URL.
virtual int Sync ()
virtual int Trunc (long long Offset)
virtual int Write (char *Buffer, long long Offset, int Length)
virtual void Update (XrdOucCacheIO &iocp)
bool Detach (XrdOucCacheIOCD &iocdP)
virtual bool ioActive ()=0
virtual void DetachFinalize ()=0
XrdSysTraceGetTrace ()
XrdOucCacheIOGetInput ()

Protected Member Functions

const char * GetPath ()

Protected Attributes

XrdOucCacheStatsm_statsGlobal
 reference to Cache statistics
Cachem_cache
 reference to Cache needed in detach
const char * m_traceID
std::string m_path

Private Member Functions

void SetInput (XrdOucCacheIO *)

Private Attributes

XrdOucCacheIOm_io
 original data source
XrdSysMutex updMutex

Detailed Description

Base cache-io class that implements XrdOucCacheIO abstract methods.


Constructor & Destructor Documentation

XrdPfc::IO::IO ( XrdOucCacheIO io,
XrdOucCacheStats stats,
Cache cache 
)

Member Function Documentation

virtual XrdOucCacheIO* XrdPfc::IO::Base (  )  [inline, virtual]

Original data source.

References m_io.

bool XrdPfc::IO::Detach ( XrdOucCacheIOCD iocd  )  [virtual]

Detach this CacheIO object from the cache.

Note:
This method must be called instead of using the delete operator since CacheIO objects may have multiple outstanding references and actual deletion may need to be defered.
Parameters:
iocd reference to the detach complete callback object.
Returns:
true Deletion can occur immediately. There is no outstanding I/O.
false Deletion must be deferred until it is safe to so from the cache perspective. At which point, the cache will call the DetachDone() method in the passed callback object. No locks may be held with respect to the CacheIO object when this is done to avoid deadlocks.

Implements XrdOucCacheIO.

virtual void XrdPfc::IO::DetachFinalize (  )  [pure virtual]
XrdOucCacheIO* XrdPfc::IO::GetInput (  ) 
const char* XrdPfc::IO::GetPath (  )  [inline, protected]

References m_path.

XrdSysTrace* XrdPfc::IO::GetTrace (  )  [inline]
virtual bool XrdPfc::IO::ioActive (  )  [pure virtual]
virtual const char* XrdPfc::IO::Path (  )  [inline, virtual]

Original data source URL.

Implements XrdOucCacheIO.

References m_io, and XrdOucCacheIO::Path().

void XrdPfc::IO::SetInput ( XrdOucCacheIO  )  [private]
virtual int XrdPfc::IO::Sync (  )  [inline, virtual]

Perform an synchronous sync() operation.

Returns:
<0 - Sync failed, value is -errno. =0 - Sync succeeded.

Implements XrdOucCacheIO.

virtual int XrdPfc::IO::Trunc ( long long  offs  )  [inline, virtual]

Perform an synchronous trunc() operation.

Parameters:
offs the size the file is have.
Returns:
<0 - Trunc failed, value is -errno. =0 - Trunc succeeded.

Implements XrdOucCacheIO.

virtual void XrdPfc::IO::Update ( XrdOucCacheIO iocp  )  [virtual]
virtual int XrdPfc::IO::Write ( char *  buff,
long long  offs,
int  wlen 
) [inline, virtual]

Perform an synchronous write.

Parameters:
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
Returns:
< 0 - Write failed, value is -errno. >=0 - Write succeeded, value is number of bytes written.

Implements XrdOucCacheIO.


Member Data Documentation

Cache& XrdPfc::IO::m_cache [protected]

reference to Cache needed in detach

Referenced by GetTrace().

original data source

Referenced by Base(), and Path().

std::string XrdPfc::IO::m_path [protected]

Referenced by GetPath().

reference to Cache statistics

const char* XrdPfc::IO::m_traceID [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 7 Jul 2020 for xrootd by  doxygen 1.6.1