qpid::cluster::Cluster Class Reference

Connection to the cluster. More...

#include <Cluster.h>

Inheritance diagram for qpid::cluster::Cluster:

Inheritance graph
[legend]
Collaboration diagram for qpid::cluster::Cluster:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< MemberMemberList

Public Member Functions

 Cluster (const std::string &name, const Url &url, broker::Broker &)
 Join a cluster.
boost::intrusive_ptr
< broker::SessionManager::Observer
getObserver ()
MemberList getMembers () const
 Get the current cluster membership.
size_t size () const
 Number of members in the cluster.
bool empty () const
bool wait (boost::function< bool(const Cluster &)> predicate, sys::Duration timeout=sys::TIME_INFINITE) const
 Wait for predicate(*this) to be true, up to timeout.
void send (framing::AMQFrame &, framing::FrameHandler *)
 Send frame to the cluster.

Friends

std::ostream & operator<< (std::ostream &, const Cluster &)
std::ostream & operator<< (std::ostream &, const MemberMap::value_type &)
std::ostream & operator<< (std::ostream &, const MemberMap &)

Classes

struct  Member
 Details of a cluster member. More...


Detailed Description

Connection to the cluster.

Keeps cluster membership data.


Constructor & Destructor Documentation

qpid::cluster::Cluster::Cluster ( const std::string &  name,
const Url url,
broker::Broker  
)

Join a cluster.

Parameters:
name of the cluster.
url of this broker, sent to the cluster.


Member Function Documentation

MemberList qpid::cluster::Cluster::getMembers (  )  const

Get the current cluster membership.

size_t qpid::cluster::Cluster::size (  )  const

Number of members in the cluster.

bool qpid::cluster::Cluster::wait ( boost::function< bool(const Cluster &)>  predicate,
sys::Duration  timeout = sys::TIME_INFINITE 
) const

Wait for predicate(*this) to be true, up to timeout.

Returns:
True if predicate became true, false if timed out. Note the predicate may not be true after wait returns, all the caller can say is it was true at some earlier point.


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

Generated on Thu May 15 22:24:19 2008 for Qpid by  doxygen 1.5.5