Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Private Attributes
CACacheLoadBalancing Class Reference

This class stores Addresses off different Cache-Proxies. More...

List of all members.

Public Member Functions

 CACacheLoadBalancing ()
 ~CACacheLoadBalancing ()
SINT32 clean ()
 Deletes all information.
SINT32 add (CASocketAddr *const pAddr)
CASocketAddrINetget ()
 Gets the 'next' Address according to the Load-Balancing algorithm.
UINT32 getElementCount ()

Private Attributes

CACHE_LB_ENTRYpSelectedEntry
UINT32 m_ElementCount
CAMutex m_csLock

Detailed Description

This class stores Addresses off different Cache-Proxies.

It can be used for Load Balancing between them. Currently a simple Ropund Robin is implemented.


Constructor & Destructor Documentation

References m_ElementCount, and pSelectedEntry.

References clean().


Member Function Documentation

Gets the 'next' Address according to the Load-Balancing algorithm.

This is the Address which should be used for a connection to a cache proxy.

Returns:
next Address of a Cache-Proxy

References CAMutex::lock(), m_csLock, t_cachelb_list::next, t_cachelb_list::pAddr, pSelectedEntry, and CAMutex::unlock().

Referenced by CALastMixA::loop(), CALastMixB::loop(), and CALastMix::setTargets().


Member Data Documentation

Referenced by add(), clean(), and get().

Referenced by add(), CACacheLoadBalancing(), clean(), and get().