1 #ifndef __XRDOUCCACHE_HH__
2 #define __XRDOUCCACHE_HH__
148 virtual int Fstat(
struct stat &sbuff) {(void)sbuff;
return 1;}
161 const char *
Location(
bool refresh=
false) {(void)refresh;
return "";}
188 static const uint64_t
forceCS = 0x0000000000000001ULL;
190 virtual int pgRead(
char *buff,
193 std::vector<uint32_t> &csvec,
218 std::vector<uint32_t> &csvec,
239 virtual int pgWrite(
char *buff,
242 std::vector<uint32_t> &csvec,
266 std::vector<uint32_t> &csvec,
282 {(void)offs; (void)rlen; (void)
opts;}
318 virtual int Read (
char *buff,
long long offs,
int rlen) = 0;
334 {iocb.
Done(
Read(buff, offs, rlen));}
391 virtual int Trunc(
long long offs) = 0;
432 virtual int Write(
char *buff,
long long offs,
int wlen) = 0;
574 {(void)url; (void)buff; (void)blen; (void)why;
576 if (buff && blen > 0) *buff = 0;
597 virtual int Prepare(
const char *url,
int oflags, mode_t mode)
598 {(void)url; (void)oflags; (void)mode;
return 0;}
610 virtual int Rename(
const char* oldp,
const char* newp)
611 {(void)oldp; (void)newp;
return 0;}
622 virtual int Rmdir(
const char* dirp) {(void)dirp;
return 0;}
638 virtual int Stat(
const char *url,
struct stat &sbuff)
639 {(void)url; (void)sbuff;
return 1;}
652 {(void)path; (void)size;
return 0;}
663 virtual int Unlink(
const char* path) {(void)path;
return 0;}
679 {(void)cmd; (void)arg; (void)arglen;
return -ENOTSUP;}
702 {strncpy(
const_cast<char *
>(
CacheType), ctype,
int stat(const char *path, struct stat *buf)
virtual void Done(int result)=0
virtual ~XrdOucCacheIOCB()
virtual ~XrdOucCacheIOCD()
virtual void DetachDone()=0
Indicate that the CacheIO object has been detached.
virtual const char * Path()=0
virtual int WriteV(const XrdOucIOVec *writV, int wnum)
virtual int Read(char *buff, long long offs, int rlen)=0
virtual int Fstat(struct stat &sbuff)
virtual int Write(char *buff, long long offs, int wlen)=0
virtual void Update(XrdOucCacheIO &iocp)
virtual const char * Location(bool refresh=false)
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 void Preread(aprParms &Parms)
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 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)
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 XrdOucCacheIO * Attach(XrdOucCacheIO *ioP, int opts=0)=0
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)