Class MessageSendManager

  • All Implemented Interfaces:
    Manager

    public class MessageSendManager
    extends java.lang.Object
    implements Manager
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.slf4j.Logger LOG  
      static java.lang.String NAME  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearBuffer()  
      void close​(org.apache.hugegraph.computer.core.config.Config config)
      Close the resources used in the computation.
      void finishSend​(MessageType type)
      Finsih send message, send the last buffer and put an END signal into queue
      void init​(org.apache.hugegraph.computer.core.config.Config config)
      Used to add the resources needed by the computation.
      MessageStat messageStat​(int partitionId)  
      java.lang.String name()
      The unique identify name.
      void sendEdge​(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)  
      void sendMessage​(org.apache.hugegraph.computer.core.graph.id.Id targetId, org.apache.hugegraph.computer.core.graph.value.Value value)  
      void sendVertex​(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)
      There will multiple threads calling the method
      void startSend​(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
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • 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: Manager
        The unique identify name.
        Specified by:
        name in interface Manager
      • init

        public void init​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Used to add the resources needed by the computation. Be called only one time before all supersteps start.
        Specified by:
        init in interface Manager
      • close

        public void close​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Close the resources used in the computation. Be called only one time after all supersteps ended.
        Specified by:
        close in interface Manager
      • 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()