1 #ifndef __XRDNETCACHE_HH__
2 #define __XRDNETCACHE_HH__
35 #include <sys/types.h>
72 void SetKT(
int ktval) {keepTime = ktval;}
93 static const int LoadMax = 80;
96 {
union {
long long aV6[2];
106 inline int operator!=(
const anItem &oth)
107 {
return aLen != oth.aLen || aHash != oth.aHash
108 || memcmp(aVal, oth.aVal, aLen);
111 anItem() : Next(0), hName(0), aLen(0) {}
113 anItem(anItem &Item,
const char *hn,
int kt)
114 : Next(0), hName(strdup(hn)), expTime(time(0)+kt),
115 aHash(Item.aHash), aLen(Item.aLen)
116 {memcpy(aVal, Item.aVal, Item.aLen);}
117 ~anItem() {
if (hName) free(hName);}
122 anItem *Locate(anItem &Item);
static void SetKT(int ktval)
void Add(XrdNetAddrInfo *hAddr, const char *hName)
char * Find(XrdNetAddrInfo *hAddr)
XrdNetCache(int psize=987, int csize=1597)