public interface MessageReceiver
Modifier and Type | Method and Description |
---|---|
default void |
clean()
Clean any state associated with the receiver and go to initial state
|
default void |
close()
Close the receiver
|
void |
init(Config cfg,
DataFlowOperation op,
java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
Initialize the message receiver with tasks from which messages are expected
For each sub edge in graph, for each path, gives the expected task ids
|
boolean |
isComplete()
Weather we are complete a set of messages
|
default boolean |
onMessage(int source,
int path,
int target,
int flags,
int tag,
java.lang.Object object)
The actual message callback
|
boolean |
onMessage(int source,
int path,
int target,
int flags,
java.lang.Object object)
The actual message callback
|
boolean |
progress()
This method will be called by the communicationProgress
|
void init(Config cfg, DataFlowOperation op, java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
target -> source tasks
expectedIds
- expected task idsboolean onMessage(int source, int path, int target, int flags, java.lang.Object object)
source
- the source taskpath
- the path that is taken by the message, that is intermediate targetstarget
- the target of this receiverflags
- the communication flagsobject
- the actual messagedefault boolean onMessage(int source, int path, int target, int flags, int tag, java.lang.Object object)
source
- the source taskpath
- the path that is taken by the message, that is intermediate targetstarget
- the target of this receiverflags
- the communication flagstag
- tag value to identify this operationobject
- the actual messageboolean progress()
boolean isComplete()
default void close()
default void clean()