Loading...
Searching...
No Matches
XrdCmsKey Class Reference

`#include <XrdCmsKey.hh>`

Collaboration diagram for XrdCmsKey:

## Public Member Functions

| XrdCmsKey (char *key=0, int klen=0)
| ~XrdCmsKey ()
int | Equiv (XrdCmsKey &oth)
int | operator!= (const XrdCmsKey &oth)
XrdCmsKey & | operator= (const XrdCmsKey &rhs)
int | operator== (const XrdCmsKey &oth)
void | setHash ()

## Public Attributes

unsigned int | Hash
short | Len
unsigned char | Ref
unsigned char | TOD
XrdCmsKeyItem * | TODRef
char * | Val

## Detailed Description

Definition at line 47 of file XrdCmsKey.hh.

## Constructor & Destructor Documentation

## XrdCmsKey()

XrdCmsKey::XrdCmsKey | ( | char * | key = 0,
|  | int | klen = 0 )

inline

Definition at line 75 of file XrdCmsKey.hh.

: TODRef(0), Val(key), Hash(0), Len(klen), Ref('\0') {}
XrdCmsKey::Hash
unsigned int Hash
Definition XrdCmsKey.hh:53
XrdCmsKey::TODRef
XrdCmsKeyItem * TODRef
Definition XrdCmsKey.hh:51
XrdCmsKey::Val
char * Val
Definition XrdCmsKey.hh:52
XrdCmsKey::Ref
unsigned char Ref
Definition XrdCmsKey.hh:56
XrdCmsKey::Len
short Len
Definition XrdCmsKey.hh:54

References Hash, Len, Ref, TODRef, and Val.

Referenced by Equiv(), operator!=(), operator=(), and operator==().

Here is the caller graph for this function:

## ~XrdCmsKey()

XrdCmsKey::~XrdCmsKey | ( |  | ) |

inline

Definition at line 77 of file XrdCmsKey.hh.

{};

## Member Function Documentation

## Equiv()

int XrdCmsKey::Equiv | ( | XrdCmsKey & | oth | ) |

inline

Definition at line 60 of file XrdCmsKey.hh.

{return Hash == oth.Hash && Ref == oth.Ref;}

References XrdCmsKey(), Hash, and Ref.

Referenced by XrdCmsCache::AddFile(), XrdCmsCache::UnkFile(), and XrdCmsCache::WT4File().

Here is the call graph for this function:
Here is the caller graph for this function:

## operator!=()

int XrdCmsKey::operator!= | ( | const XrdCmsKey & | oth | ) |

inline

Definition at line 72 of file XrdCmsKey.hh.

{return Hash != oth.Hash || strcmp(Val, oth.Val);}

References XrdCmsKey(), Hash, and Val.

Here is the call graph for this function:

## operator=()

XrdCmsKey & XrdCmsKey::operator= | ( | const XrdCmsKey & | rhs | ) |

inline

Definition at line 63 of file XrdCmsKey.hh.

{Val = strdup(rhs.Val); Hash = rhs.Hash;
Len = rhs.Len;
return *this;
}

References XrdCmsKey(), Hash, Len, and Val.

Here is the call graph for this function:

## operator==()

int XrdCmsKey::operator== | ( | const XrdCmsKey & | oth | ) |

inline

Definition at line 69 of file XrdCmsKey.hh.

{return Hash == oth.Hash && !strcmp(Val, oth.Val);}

References XrdCmsKey(), Hash, and Val.

Here is the call graph for this function:

## setHash()

void XrdCmsKey::setHash | ( |  | ) |

Definition at line 48 of file XrdCmsKey.cc.

{
if (!Len) Len = strlen(Val);
if (!(Hash = XrdOucCRC::CRC32((const unsigned char *)Val, Len))) Hash = 1;
}
XrdOucCRC::CRC32
static uint32_t CRC32(const unsigned char *data, int count)
Definition XrdOucCRC.cc:171

References XrdOucCRC::CRC32(), Hash, Len, and Val.

Referenced by XrdCmsNash::Add(), and XrdCmsNash::Find().

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## Hash

unsigned int XrdCmsKey::Hash

Definition at line 53 of file XrdCmsKey.hh.

Referenced by XrdCmsKey(), XrdCmsNash::Add(), XrdCmsNode::do_Have(), Equiv(), XrdCmsNash::Find(), XrdCmsCluster::Locate(), operator!=(), operator=(), operator==(), XrdCmsCluster::Select(), setHash(), XrdCmsKeyItem::Unload(), and XrdCmsKeyItem::Unload().

## Len

short XrdCmsKey::Len

Definition at line 54 of file XrdCmsKey.hh.

Referenced by XrdCmsKey(), XrdCmsNode::do_Select(), XrdCmsCluster::Locate(), operator=(), XrdCmsCluster::Select(), and setHash().

## Ref

unsigned char XrdCmsKey::Ref

Definition at line 56 of file XrdCmsKey.hh.

Referenced by XrdCmsKey(), XrdCmsCache::AddFile(), XrdCmsKeyItem::Alloc(), Equiv(), and XrdCmsCache::GetFile().

## TOD

unsigned char XrdCmsKey::TOD

Definition at line 55 of file XrdCmsKey.hh.

Referenced by XrdCmsNash::Add(), XrdCmsCache::AddFile(), XrdCmsKeyItem::Alloc(), XrdCmsCache::GetFile(), XrdCmsKeyItem::Unload(), and XrdCmsKeyItem::Unload().

## TODRef

XrdCmsKeyItem* XrdCmsKey::TODRef

Definition at line 51 of file XrdCmsKey.hh.

Referenced by XrdCmsKey(), XrdCmsCache::AddFile(), XrdCmsKeyItem::Alloc(), XrdCmsCache::GetFile(), XrdCmsCache::UnkFile(), XrdCmsKeyItem::Unload(), XrdCmsKeyItem::Unload(), and XrdCmsCache::WT4File().

## Val

char* XrdCmsKey::Val

Definition at line 52 of file XrdCmsKey.hh.

Referenced by XrdCmsKey(), XrdCmsCache::DelFile(), XrdCmsCluster::Locate(), operator!=(), operator=(), operator==(), XrdCmsCluster::Select(), setHash(), XrdCmsCache::UnkFile(), and XrdCmsCache::WT4File().

The documentation for this class was generated from the following files:

- XrdCmsKey.hh
- XrdCmsKey.cc