#include <XrdOucCache2.hh>
Public Member Functions | |
virtual int | Fstat (struct stat &sbuff) |
virtual const char * | Location () |
virtual void | Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen) |
virtual void | ReadV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int rnum) |
virtual void | Sync (XrdOucCacheIOCB &iocb) |
virtual void | Update (XrdOucCacheIO2 &iocp) |
virtual void | Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen) |
virtual | ~XrdOucCacheIO2 () |
This class is an extension of the original XrdOucCache class and provides async I/O support, defered open and I/O decoupling. It is loaded as a cache plugin by the POSIX package via the proxy directive
pss.cache -2 <path>
Without the "-2" the original version is loaded. Implementation of a cache is similar between versions (see XrdOucCache.hh for details). The only difference is this version requires additional methods to be implemented and uses an asynchrnous callback mechanism to return the results. The XrdOucCacheIO2 object is responsible for interacting with the original data source/target. It can be used with or without a front-end cache. It an extension of the XrdOucCacheIO class which defines base methods.
virtual XrdOucCacheIO2::~XrdOucCacheIO2 | ( | ) | [inline, virtual] |
virtual int XrdOucCacheIO2::Fstat | ( | struct stat & | sbuff | ) | [inline, virtual] |
Perform an fstat() operation (defaults to passthrough).
sbuff | reference to the stat buffer to be filled in. Only fields st_size, st_blocks, st_mtime (st_atime and st_ctime may be set to st_mtime), st_ino, and st_mode need to be set. All other fields are preset and should not be changed. |
Reimplemented in XrdFileCache::IOEntireFile, XrdFileCache::IOFileBlock, XrdPosixCacheBCIO, XrdPosixFile, and XrdPosixPrepIO.
Referenced by XrdPosixCacheBCIO::Fstat().
virtual const char* XrdOucCacheIO2::Location | ( | ) | [inline, virtual] |
Get the file's location (i.e. endpoint hostname and port)
Reimplemented in XrdPosixCacheBCIO, and XrdPosixFile.
Referenced by XrdPosixCacheBCIO::Location().
virtual void XrdOucCacheIO2::Read | ( | XrdOucCacheIOCB & | iocb, | |
char * | buff, | |||
long long | offs, | |||
int | rlen | |||
) | [inline, virtual] |
Reimplemented in XrdPosixFile, and XrdPosixPrepIO.
References XrdOucCacheIOCB::Done(), and Read().
Referenced by Read().
virtual void XrdOucCacheIO2::ReadV | ( | XrdOucCacheIOCB & | iocb, | |
const XrdOucIOVec * | readV, | |||
int | rnum | |||
) | [inline, virtual] |
Reimplemented in XrdPosixFile, and XrdPosixPrepIO.
References XrdOucCacheIOCB::Done(), and ReadV().
Referenced by ReadV().
virtual void XrdOucCacheIO2::Sync | ( | XrdOucCacheIOCB & | iocb | ) | [inline, virtual] |
Reimplemented in XrdPosixFile, and XrdPosixPrepIO.
References XrdOucCacheIOCB::Done(), and Sync().
Referenced by Sync().
virtual void XrdOucCacheIO2::Update | ( | XrdOucCacheIO2 & | iocp | ) | [inline, virtual] |
Update the originally passed XrdOucCacheIO2 object with the object passed. All future uses underlying XrdOucCacheIO2 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 XrdOucCacheIO2 passed to Attach(). When this occurs, the file is actually opened and Update() called to replace the original XrdOucCacheIO2 object with one that uses the newly opened file.
iocp | reference to the new XrdOucCacheIO2 object. |
virtual void XrdOucCacheIO2::Write | ( | XrdOucCacheIOCB & | iocb, | |
char * | buff, | |||
long long | offs, | |||
int | wlen | |||
) | [inline, virtual] |
Reimplemented in XrdPosixFile, and XrdPosixPrepIO.
References XrdOucCacheIOCB::Done(), and Write().
Referenced by Write().