Class WriteBuffers


  • public class WriteBuffers
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      WriteBuffers​(org.apache.hugegraph.computer.core.common.ComputerContext context, int threshold, int capacity)  
    • Constructor Detail

      • WriteBuffers

        public WriteBuffers​(org.apache.hugegraph.computer.core.common.ComputerContext context,
                            int threshold,
                            int capacity)
    • Method Detail

      • reachThreshold

        public boolean reachThreshold()
      • isEmpty

        public boolean isEmpty()
      • resetMessageWritten

        public void resetMessageWritten()
      • writeVertex

        public void writeVertex​(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • writeEdges

        public void writeEdges​(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • writeMessage

        public void writeMessage​(org.apache.hugegraph.computer.core.graph.id.Id targetId,
                                 org.apache.hugegraph.computer.core.graph.value.Value value)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • switchForSorting

        public void switchForSorting()
      • prepareSorting

        public void prepareSorting()
        Can remove synchronized if MessageSendManager.finish() only called by single thread
      • finishSorting

        public void finishSorting()
      • wrapForRead

        public org.apache.hugegraph.computer.core.io.RandomAccessInput wrapForRead()