1 #ifndef __SUT_CACHE_H__
2 #define __SUT_CACHE_H__
88 static const int maxTries = 100;
89 static const int retryMSW = 300;
92 XrdSutPFCache() { cachemx = -1; cachesz = 0; cachent = 0; lifetime = 300;
93 utime = -1; htmtime = -1; pfile =
""; isinit = 0; }
97 int Entries()
const {
return (cachemx+1); }
98 bool Empty()
const {
return (cachemx == -1); }
101 int Init(
int capacity = 100,
bool lock = 1);
102 int Reset(
int newsz = -1,
bool lock = 1);
103 int Load(
const char *pfname);
104 int Flush(
const char *pfname = 0);
106 int Rehash(
bool force = 0,
bool lock = 1);
114 bool Remove(
const char *
ID,
int opt = 1);
115 int Trim(
int lifet = 0);
118 void Dump(
const char *msg= 0);
void Lock(XrdSysMutex *Mutex)
void Set(XrdSysMutex *Mutex)
bool Remove(const char *ID, int opt=1)
XrdSutPFEntry * Get(int i) const
int Flush(const char *pfname=0)
XrdSutPFEntry * Add(XrdSutPFCacheRef &urRef, const char *ID, bool force=0)
void SetLifetime(int lifet=300)
int Reset(int newsz=-1, bool lock=1)
int Init(int capacity=100, bool lock=1)
void Dump(const char *msg=0)
int Load(const char *pfname)
int Rehash(bool force=0, bool lock=1)