Class MessageRecvManager

    • Constructor Detail

      • MessageRecvManager

        public MessageRecvManager​(org.apache.hugegraph.computer.core.common.ComputerContext context,
                                  FileManager fileManager,
                                  SortManager sortManager)
    • 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
      • beforeSuperstep

        public void beforeSuperstep​(org.apache.hugegraph.computer.core.config.Config config,
                                    int superstep)
        Description copied from interface: Manager
        Do some initialization for a superstep. Be called before a superstep. Subclass should override this method if wants to do something before a superstep.
        Specified by:
        beforeSuperstep in interface Manager
      • afterSuperstep

        public void afterSuperstep​(org.apache.hugegraph.computer.core.config.Config config,
                                   int superstep)
        Description copied from interface: Manager
        Do some clean up for a superstep. Be called after a superstep. Subclass should override this method if wants to do something after a superstep.
        Specified by:
        afterSuperstep in interface Manager
      • onChannelInactive

        public void onChannelInactive​(ConnectionId connectionId)
        Description copied from interface: TransportHandler
        Invoked when the channel associated with the given connectionId is inactive. No further requests will come from this channel.
        Specified by:
        onChannelInactive in interface TransportHandler
      • waitReceivedAllMessages

        public void waitReceivedAllMessages()
      • handle

        public void handle​(MessageType messageType,
                           int partition,
                           NetworkBuffer buffer)
        Description copied from interface: MessageHandler
        Handle the buffer received. There are two buffer list for a partition, one for sorting and one for receiving new buffers. It may block the caller if the receiving list reached threshold and the sorting list is sorting in process.
        Specified by:
        handle in interface MessageHandler
      • vertexPartitions

        public java.util.Map<java.lang.Integer,​PeekableIterator<KvEntry>> vertexPartitions()
        Get the Iterator of each partition.
      • messageStats

        public java.util.Map<java.lang.Integer,​MessageStat> messageStats()