Class MessageSendManager
- java.lang.Object
-
- org.apache.hugegraph.computer.core.sender.MessageSendManager
-
-
Constructor Summary
Constructors Constructor Description MessageSendManager(org.apache.hugegraph.computer.core.common.ComputerContext context, SortManager sortManager, MessageSender sender)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearBuffer()voidclose(org.apache.hugegraph.computer.core.config.Config config)Close the resources used in the computation.voidfinishSend(MessageType type)Finsih send message, send the last buffer and put an END signal into queuevoidinit(org.apache.hugegraph.computer.core.config.Config config)Used to add the resources needed by the computation.MessageStatmessageStat(int partitionId)java.lang.Stringname()The unique identify name.voidsendEdge(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)voidsendMessage(org.apache.hugegraph.computer.core.graph.id.Id targetId, org.apache.hugegraph.computer.core.graph.value.Value value)voidsendVertex(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)There will multiple threads calling the methodvoidstartSend(MessageType type)Start send message, put an START signal into queue-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hugegraph.computer.core.manager.Manager
afterSuperstep, beforeSuperstep, inited
-
-
-
-
Field Detail
-
LOG
public static final org.slf4j.Logger LOG
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessageSendManager
public MessageSendManager(org.apache.hugegraph.computer.core.common.ComputerContext context, SortManager sortManager, MessageSender sender)
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:ManagerThe unique identify name.
-
init
public void init(org.apache.hugegraph.computer.core.config.Config config)
Description copied from interface:ManagerUsed to add the resources needed by the computation. Be called only one time before all supersteps start.
-
close
public void close(org.apache.hugegraph.computer.core.config.Config config)
Description copied from interface:ManagerClose the resources used in the computation. Be called only one time after all supersteps ended.
-
sendVertex
public void sendVertex(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)
There will multiple threads calling the method
-
sendEdge
public void sendEdge(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)
-
sendMessage
public void sendMessage(org.apache.hugegraph.computer.core.graph.id.Id targetId, org.apache.hugegraph.computer.core.graph.value.Value value)
-
startSend
public void startSend(MessageType type)
Start send message, put an START signal into queue- Parameters:
type- the message type
-
finishSend
public void finishSend(MessageType type)
Finsih send message, send the last buffer and put an END signal into queue- Parameters:
type- the message type
-
messageStat
public MessageStat messageStat(int partitionId)
-
clearBuffer
public void clearBuffer()
-
-