public interface IParallelOperation
Modifier and Type | Method and Description |
---|---|
default void |
close()
Close the parallel operation
|
default void |
finish(int source)
Indicate the end of the operation
|
BaseOperation |
getOp() |
boolean |
isComplete()
Check weather the operation is complete
|
boolean |
progress()
Progress the parallel operation
|
void |
register(int targetTask,
java.util.concurrent.BlockingQueue<IMessage> queue)
Register a queue for receiving message
|
void |
registerSync(int targetTask,
ISync sync)
Register a callback to notify when a sync happens
|
default void |
reset()
Refresh the operation to start from beginning
|
boolean |
send(int source,
IMessage message,
int flags)
Send a message over the operation
|
default boolean |
sendBarrier(int src,
byte[] barrierId) |
boolean send(int source, IMessage message, int flags)
source
- sourcemessage
- the messagevoid register(int targetTask, java.util.concurrent.BlockingQueue<IMessage> queue)
void registerSync(int targetTask, ISync sync)
targetTask
- the targetsync
- syncboolean progress()
boolean isComplete()
default void finish(int source)
source
- the sourcedefault void close()
default void reset()
default boolean sendBarrier(int src, byte[] barrierId)
BaseOperation getOp()