@Deprecated @Override public String getMessageType() { return MessageType.USER_DEFINE_MSG.name(); }
@Deprecated @Override public String getMessageType() { return MessageType.USER_DEFINE_MSG.name(); }
@Override public List<String> getMessageTypes() { return ImmutableList.of(MessageType.SCHEDULER_MSG.name()); }
@Override public String getMessageType() { return MessageType.CONTROLLER_MSG.name(); }
@Override public List<String> getMessageTypes() { return ImmutableList.of(MessageType.TASK_REPLY.name()); }
@Override public String getMessageType() { return MessageType.TASK_REPLY.name(); }
@Override public String getMessageType() { return MessageType.STATE_TRANSITION.name(); }
private String getStatusUpdateKey(Message message) { if (message.getMsgType().equalsIgnoreCase(MessageType.STATE_TRANSITION.name())) { return message.getPartitionName(); } return message.getMsgId(); }
String getStatusUpdateRecordName(Message message) { if (message.getMsgType().equalsIgnoreCase(MessageType.STATE_TRANSITION.name())) { return message.getTgtSessionId() + "__" + message.getResourceName(); } return message.getMsgId(); }
String getStatusUpdateRecordName(Message message) { if (message.getMsgType().equalsIgnoreCase(MessageType.STATE_TRANSITION.name())) { return message.getTgtSessionId() + "__" + message.getResourceName(); } return message.getMsgId(); }
/** * Generate the sub-path under STATUSUPDATE or ERROR path for a status update */ String getStatusUpdateSubPath(Message message) { if (message.getMsgType().equalsIgnoreCase(MessageType.STATE_TRANSITION.name())) { return message.getResourceName(); } return message.getMsgType(); }
private String getStatusUpdateKey(Message message) { if (message.getMsgType().equalsIgnoreCase(MessageType.STATE_TRANSITION.name())) { return message.getPartitionName(); } return message.getMsgId(); }
private void setMessageState(CurrentStateOutput currentStateOutput, String resourceName, Partition partition, String instanceName, Message message) { if (MessageType.STATE_TRANSITION.name().equalsIgnoreCase(message.getMsgType())) { currentStateOutput.setPendingState(resourceName, partition, instanceName, message); } else { currentStateOutput.setCancellationState(resourceName, partition, instanceName, message); } }
/** * Instantiate a message * @param type the message category * @param msgId unique message identifier */ public Message(MessageType type, String msgId) { this(type.name(), msgId); }
/** * Whether this message is a relay message. * @return */ public boolean isRelayMessage() { String subType = _record.getStringField(Attributes.MSG_SUBTYPE.name(), null); String relayFrom = _record.getStringField(Attributes.RELAY_FROM.name(), null); return MessageType.RELAYED_MESSAGE.name().equals(subType) && (relayFrom != null); }
/** * Whether this message is a relay message. * @return */ public boolean isRelayMessage() { String subType = _record.getStringField(Attributes.MSG_SUBTYPE.name(), null); String relayFrom = _record.getStringField(Attributes.RELAY_FROM.name(), null); return MessageType.RELAYED_MESSAGE.name().equals(subType) && (relayFrom != null); }
/** * Generate the sub-path under STATUSUPDATE or ERROR path for a status update */ String getStatusUpdateSubPath(Message message) { if (message.getMsgType().equalsIgnoreCase(MessageType.STATE_TRANSITION.name())) { return message.getResourceName(); } return message.getMsgType(); }
private void setMessageState(CurrentStateOutput currentStateOutput, String resourceName, Partition partition, String instanceName, Message message) { if (MessageType.STATE_TRANSITION.name().equalsIgnoreCase(message.getMsgType())) { currentStateOutput.setPendingMessage(resourceName, partition, instanceName, message); } else { currentStateOutput.setCancellationMessage(resourceName, partition, instanceName, message); } } }
/** * Instantiate a message * @param type the message category * @param msgId unique message identifier */ public Message(MessageType type, String msgId) { this(type.name(), msgId); }