MemCacheClient::ConsistentHash Struct Reference

Maintain the N:1 hash key to server relationship used for consistent hashing. More...

List of all members.

Public Member Functions

 ConsistentHash (unsigned long aHash, Server *aServer)
 ConsistentHash (const ConsistentHash &rhs)
ConsistentHashoperator= (const ConsistentHash &rhs)
bool operator< (const ConsistentHash &rhs) const
bool operator== (const ConsistentHash &rhs) const

Public Attributes

unsigned long mHash
 hash value
ServermServer
 server implementation

Classes

struct  MatchServer


Detailed Description

Maintain the N:1 hash key to server relationship used for consistent hashing.

Consistent hashing for the servers ensures that even with changes to the server list, many of the data keys will continue to mapped to the same server. This ensures that changes to the server list doesn't invalidate the entire cache.

Definition at line 526 of file MemCacheClient.h.


Constructor & Destructor Documentation

MemCacheClient::ConsistentHash::ConsistentHash ( unsigned long  aHash,
Server aServer 
) [inline]

constructor

Definition at line 531 of file MemCacheClient.h.

MemCacheClient::ConsistentHash::ConsistentHash ( const ConsistentHash rhs  )  [inline]

copy constructor

Definition at line 534 of file MemCacheClient.h.

References operator=().


Member Function Documentation

ConsistentHash& MemCacheClient::ConsistentHash::operator= ( const ConsistentHash rhs  )  [inline]

copy

Definition at line 536 of file MemCacheClient.h.

References mHash, and mServer.

Referenced by ConsistentHash().

bool MemCacheClient::ConsistentHash::operator< ( const ConsistentHash rhs  )  const [inline]

comparison on hash value

Definition at line 539 of file MemCacheClient.h.

References mHash.

bool MemCacheClient::ConsistentHash::operator== ( const ConsistentHash rhs  )  const [inline]

equality on hash value

Definition at line 541 of file MemCacheClient.h.

References mHash.


The documentation for this struct was generated from the following file:

Generated on Tue Jun 3 17:24:05 2008 for MemCacheClient by  doxygen 1.5.6