Class FailedMessageSender
- java.lang.Object
-
- org.apache.nemo.runtime.common.message.FailedMessageSender
-
- All Implemented Interfaces:
MessageSender<ControlMessage.Message>
public final class FailedMessageSender extends java.lang.Object implements MessageSender<ControlMessage.Message>
A message sender that failed.
-
-
Constructor Summary
Constructors Constructor Description FailedMessageSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the connection.java.util.concurrent.CompletableFuture<ControlMessage.Message>
request(ControlMessage.Message message)
Send a message to correspondingMessageListener.onMessageWithContext(T, org.apache.nemo.runtime.common.message.MessageContext)
and return a reply message.void
send(ControlMessage.Message message)
Send a message to correspondingMessageListener.onMessage(T)
.
-
-
-
Method Detail
-
send
public void send(ControlMessage.Message message)
Description copied from interface:MessageSender
Send a message to correspondingMessageListener.onMessage(T)
. It does not guarantee whether the message is sent successfully or not.- Specified by:
send
in interfaceMessageSender<ControlMessage.Message>
- Parameters:
message
- a message
-
request
public java.util.concurrent.CompletableFuture<ControlMessage.Message> request(ControlMessage.Message message)
Description copied from interface:MessageSender
Send a message to correspondingMessageListener.onMessageWithContext(T, org.apache.nemo.runtime.common.message.MessageContext)
and return a reply message. If there was an exception, the returned future would be failed.- Specified by:
request
in interfaceMessageSender<ControlMessage.Message>
- Parameters:
message
- a message- Returns:
- a future
-
close
public void close() throws java.lang.Exception
Description copied from interface:MessageSender
Closes the connection.- Specified by:
close
in interfaceMessageSender<ControlMessage.Message>
- Throws:
java.lang.Exception
-
-