XrdNetCache Class Reference

#include <XrdNetCache.hh>

Collaboration diagram for XrdNetCache:
Collaboration graph
[legend]

List of all members.

Classes

struct  anItem

Public Member Functions

void Add (XrdNetAddrInfo *hAddr, const char *hName)
char * Find (XrdNetAddrInfo *hAddr)
 XrdNetCache (int psize=987, int csize=1597)
 ~XrdNetCache ()

Static Public Member Functions

static void SetKT (int ktval)

Private Member Functions

void Expand ()
int GenKey (anItem &Item, XrdNetAddrInfo *hAddr)
anItemLocate (anItem &Item)

Private Attributes

XrdSysMutex myMutex
anItem ** nashtable
int prevtablesize
int nashtablesize
int nashnum
int Threshold

Static Private Attributes

static const int LoadMax = 80
static int keepTime

Constructor & Destructor Documentation

XrdNetCache::XrdNetCache ( int  psize = 987,
int  csize = 1597 
)

Constructor. When allocateing a new hash, two adjacent Fibonocci numbers. The series is simply n[j] = n[j-1] + n[j-2].

Parameters:
psize the correct Fibonocci antecedent to csize.
csize the initial size of the table.
XrdNetCache::~XrdNetCache (  )  [inline]

Destructor. The XrdNetCache object is not designed to be deleted. Doing so will cause memory to be lost.


Member Function Documentation

void XrdNetCache::Add ( XrdNetAddrInfo hAddr,
const char *  hName 
)

Add an address-hostname association to the cache. The address must be an INET family address; otherwise it is not added.

Parameters:
hAddr points to the address of the name.
hName points to the name to be associated with the address.
void XrdNetCache::Expand (  )  [private]
char* XrdNetCache::Find ( XrdNetAddrInfo hAddr  ) 

Locate an address-hostname association in the cache.

Parameters:
hAddr points to the address of the name.
Returns:
Success: an strdup'd string of the corresponding name. Failure: 0;
int XrdNetCache::GenKey ( anItem Item,
XrdNetAddrInfo hAddr 
) [private]
anItem* XrdNetCache::Locate ( anItem Item  )  [private]
static void XrdNetCache::SetKT ( int  ktval  )  [inline, static]

Set the default keep time for entries in the cache during initialization.

Parameters:
ktVal the number of seconds to keep an entry in the cache.

References keepTime.


Member Data Documentation

int XrdNetCache::keepTime [static, private]

Referenced by SetKT().

const int XrdNetCache::LoadMax = 80 [static, private]
int XrdNetCache::nashnum [private]
int XrdNetCache::Threshold [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 4 Sep 2020 for xrootd by  doxygen 1.6.1