1#ifndef __XRDOUCCACHE_HH__
2#define __XRDOUCCACHE_HH__
150 {resp =
"Function not supported";
175virtual int Fstat(
struct stat &sbuff) {(void)sbuff;
return 1;}
188const char *
Location(
bool refresh=
false) {(void)refresh;
return "";}
215static const uint64_t
forceCS = 0x0000000000000001ULL;
217virtual int pgRead(
char *buff,
220 std::vector<uint32_t> &csvec,
245 std::vector<uint32_t> &csvec,
269 std::vector<uint32_t> &csvec,
293 std::vector<uint32_t> &csvec,
309 {(void)offs; (void)rlen; (void)
opts;}
318 {
for (
auto it = rlist.begin(); it != rlist.end(); it++)
356virtual int Read (
char *buff,
long long offs,
int rlen) = 0;
372 {iocb.
Done(
Read(buff, offs, rlen));}
429virtual int Trunc(
long long offs) = 0;
470virtual int Write(
char *buff,
long long offs,
int wlen) = 0;
574 {resp =
"Function not supported";
628 {(void)url; (void)buff; (void)blen; (void)why;
630 if (buff && blen > 0) *buff = 0;
651virtual int Prepare(
const char *url,
int oflags, mode_t mode)
652 {(void)url; (void)oflags; (void)mode;
return 0;}
664virtual int Rename(
const char* oldp,
const char* newp)
665 {(void)oldp; (void)newp;
return 0;}
676virtual int Rmdir(
const char* dirp) {(void)dirp;
return 0;}
692virtual int Stat(
const char *url,
struct stat &sbuff)
693 {(void)url; (void)sbuff;
return 1;}
706 {(void)path; (void)size;
return 0;}
717virtual int Unlink(
const char* path) {(void)path;
return 0;}
733 {(void)cmd; (void)arg; (void)arglen;
return -ENOTSUP;}
756 {strncpy(
const_cast<char *
>(
CacheType), ctype,
static XrdSysLogger Logger
std::vector< XrdOucRange > XrdOucRangeList
virtual void Done(int result)=0
virtual ~XrdOucCacheIOCB()
virtual ~XrdOucCacheIOCD()
virtual void DetachDone()=0
Indicate that the CacheIO object has been detached.
virtual int WriteV(const XrdOucIOVec *writV, int wnum)
virtual int Read(char *buff, long long offs, int rlen)=0
virtual int Fcntl(XrdOucCacheOp::Code opc, const std::string &args, std::string &resp)
virtual int Fstat(struct stat &sbuff)
virtual int Write(char *buff, long long offs, int wlen)=0
virtual void Update(XrdOucCacheIO &iocp)
static const int SingleUse
Mark pages for single use.
static const uint64_t forceCS
virtual void Trunc(XrdOucCacheIOCB &iocb, long long offs)
virtual void Preread(long long offs, int rlen, int opts=0)
virtual long long FSize()=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 const char * Path()=0
virtual void Preread(aprParms &Parms)
virtual const char * Location(bool refresh=false)
virtual void WriteV(XrdOucCacheIOCB &iocb, const XrdOucIOVec *writV, int wnum)
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 bool Detach(XrdOucCacheIOCD &iocd)=0
virtual void Sync(XrdOucCacheIOCB &iocb)
virtual void Read(XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen)
virtual int pgRead(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 Write(XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen)
XrdOucCacheIO()
Construct and Destructor.
virtual void Preread(XrdOucRangeList &rlist)
virtual int Trunc(long long offs)=0
virtual int ReadV(const XrdOucIOVec *readV, int rnum)
virtual void ReadV(XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int rnum)
virtual int Rename(const char *oldp, const char *newp)
virtual int Stat(const char *url, struct stat &sbuff)
virtual XrdOucCacheIO * Attach(XrdOucCacheIO *ioP, int opts=0)=0
const char CacheType[8]
A 1-to-7 character cache type identifier (usually pfc or rmc).
static const int optRW
File is read/write (o/w read/only).
virtual int Truncate(const char *path, off_t size)
virtual int Xeq(XeqCmd cmd, char *arg, int arglen)
virtual ~XrdOucCache()
Destructor.
virtual int Unlink(const char *path)
virtual int LocalFilePath(const char *url, char *buff=0, int blen=0, LFP_Reason why=ForAccess, bool forall=false)
virtual int Fcntl(XrdOucCacheOp::Code opc, const std::string &args, std::string &resp)
static const int optWIN
File is new -> optRW use write-in cache.
virtual int Prepare(const char *url, int oflags, mode_t mode)
XrdOucCacheStats Statistics
XrdOucCache(const char *ctype)
virtual int Rmdir(const char *dirp)
static const int optNEW
File is new -> optRW (o/w read or write).
static const int optFIS
File is structured (e.g. root file).