本文整理了Java中org.apache.helix.model.Message.getRelayMessage()
方法的一些代码示例,展示了Message.getRelayMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getRelayMessage()
方法的具体详情如下:
包路径:org.apache.helix.model.Message
类名称:Message
方法名:getRelayMessage
[英]Get relay message attached for the given instance.
[中]获取给定实例的附加中继消息。
代码示例来源:origin: apache/helix
/**
* Get all relay messages attached to this message as a map (instance->message).
*
* @return map of instanceName->message, empty map if none.
*/
public Map<String, Message> getRelayMessages() {
Map<String, Message> relayMessageMap = new HashMap<>();
List<String> relayParticipants = _record.getListField(Attributes.RELAY_PARTICIPANTS.name());
if (relayParticipants != null) {
for (String p : relayParticipants) {
Message msg = getRelayMessage(p);
if (p != null) {
relayMessageMap.put(p, msg);
}
}
}
return relayMessageMap;
}
代码示例来源:origin: apache/helix
MasterSlaveSMD.States.MASTER.name());
Message relayMessage = message.getRelayMessage(newMasterInstance);
Assert.assertNotNull(relayMessage);
Assert.assertEquals(relayMessage.getMsgSubType(), Message.MessageType.RELAYED_MESSAGE.name());
代码示例来源:origin: apache/helix
getTopStateInstance(_bestpossibleState.getInstanceStateMap(_db, _partition), MasterSlaveSMD.States.MASTER.name());
Message relayMessage = toSlaveMessage.getRelayMessage(secondMaster);
Assert.assertNotNull(relayMessage);
Assert.assertEquals(relayMessage.getMsgSubType(), Message.MessageType.RELAYED_MESSAGE.name());
relayMessage = toSlaveMessage.getRelayMessage(thirdMaster);
Assert.assertNotNull(relayMessage);
Assert.assertEquals(relayMessage.getMsgSubType(), Message.MessageType.RELAYED_MESSAGE.name());
代码示例来源:origin: org.apache.helix/helix-core
/**
* Get all relay messages attached to this message as a map (instance->message).
*
* @return map of instanceName->message, empty map if none.
*/
public Map<String, Message> getRelayMessages() {
Map<String, Message> relayMessageMap = new HashMap<>();
List<String> relayParticipants = _record.getListField(Attributes.RELAY_PARTICIPANTS.name());
if (relayParticipants != null) {
for (String p : relayParticipants) {
Message msg = getRelayMessage(p);
if (p != null) {
relayMessageMap.put(p, msg);
}
}
}
return relayMessageMap;
}
代码示例来源:origin: apache/helix
MasterSlaveSMD.States.MASTER.name());
Message relayMessage = toSlaveMessage.getRelayMessage(newMasterInstance);
Assert.assertNotNull(relayMessage);
Assert.assertEquals(relayMessage.getMsgSubType(), Message.MessageType.RELAYED_MESSAGE.name());
内容来源于网络,如有侵权,请联系作者删除!