|
XRootD
|
#include <XrdNetCache.hh>
Collaboration diagram for XrdNetCache:Classes | |
| union | anItem.__unnamed109__ |
Public Member Functions | |
| XrdNetCache (int psize=987, int csize=1597) | |
| ~XrdNetCache () | |
| void | Add (XrdNetAddrInfo *hAddr, const char *hName) |
| char * | Find (XrdNetAddrInfo *hAddr) |
Static Public Member Functions | |
| static void | SetKT (int ktval) |
Definition at line 41 of file XrdNetCache.hh.
| union XrdNetCache::anItem.__unnamed109__ |
Definition at line 96 of file XrdNetCache.hh.
Collaboration diagram for XrdNetCache::anItem.__unnamed109__:| Class Members | ||
|---|---|---|
| int | aV4[4] | |
| long long | aV6[2] | |
| char | aVal[16] | |
| 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].
| psize | the correct Fibonocci antecedent to csize. |
| csize | the initial size of the table. |
Definition at line 49 of file XrdNetCache.cc.
|
inline |
Destructor. The XrdNetCache object is not designed to be deleted. Doing so will cause memory to be lost.
Definition at line 89 of file XrdNetCache.hh.
| 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.
| hAddr | points to the address of the name. |
| hName | points to the name to be associated with the address. |
Definition at line 63 of file XrdNetCache.cc.
References XrdSysMutex::Lock(), and XrdSysMutex::UnLock().
Referenced by XrdNetAddrInfo::Resolve().
Here is the call graph for this function:
Here is the caller graph for this function:| char * XrdNetCache::Find | ( | XrdNetAddrInfo * | hAddr | ) |
Locate an address-hostname association in the cache.
| hAddr | points to the address of the name. |
Definition at line 148 of file XrdNetCache.cc.
References XrdSysMutex::Lock(), and XrdSysMutex::UnLock().
Referenced by XrdNetAddrInfo::Format(), and XrdNetAddrInfo::Name().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Set the default keep time for entries in the cache during initialization.
| ktval | the number of seconds to keep an entry in the cache. |
Definition at line 72 of file XrdNetCache.hh.