BrokerInfo::Set Membership::getBrokers() const { Mutex::ScopedLock l(lock); BrokerInfo::Set result; transform(brokers.begin(), brokers.end(), inserter(result, result.begin()), boost::bind(&BrokerInfo::Map::value_type::second, _1)); return result; }
BrokerInfo::Set Membership::otherBackups() const { BrokerInfo::Set result; for (BrokerInfo::Map::const_iterator i = brokers.begin(); i != brokers.end(); ++i) if (isBackup(i->second.getStatus()) && i->second.getSystemId() != self) result.insert(i->second); return result; }
BrokerInfo::Set Membership::otherBackups() const { Mutex::ScopedLock l(lock); BrokerInfo::Set result; for (BrokerInfo::Map::const_iterator i = brokers.begin(); i != brokers.end(); ++i) if (i->second.getStatus() == READY && i->second.getSystemId() != self) result.insert(i->second); return result; }