message->Set("method", "cluster::HeartBeat");
message->Set("params", params);
+ Endpoint::GetByName(GetIdentity())->SetFeatures(features);
+
RelayMessage(Endpoint::Ptr(), message, false);
{
Array::Ptr authorities = object->GetAuthorities();
std::vector<String> endpoints;
- if ((type == "checker" && SupportsChecks()) ||
- (type == "notification" && SupportsNotifications()))
- endpoints.push_back(GetIdentity());
-
BOOST_FOREACH(const Endpoint::Ptr& endpoint, DynamicType::GetObjects<Endpoint>()) {
bool match = false;
std::sort(endpoints.begin(), endpoints.end());
- std::ostringstream msgbuf;
- BOOST_FOREACH(const String& name, endpoints) {
- msgbuf << name << ", ";
- }
- Log(LogDebug, "cluster", "Responsible for " + object->GetName() + ": " + msgbuf.str());
-
String key = object->GetType()->GetName() + "\t" + object->GetName();
unsigned long hash = Utility::SDBM(key);
unsigned long index = hash % endpoints.size();