Class WriteBuffers
- java.lang.Object
-
- org.apache.hugegraph.computer.core.sender.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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinishSorting()booleanisEmpty()MessageStatmessageWritten()voidprepareSorting()Can remove synchronized if MessageSendManager.finish() only called by single threadbooleanreachThreshold()voidresetMessageWritten()voidswitchForSorting()org.apache.hugegraph.computer.core.io.RandomAccessInputwrapForRead()voidwriteEdges(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)voidwriteMessage(org.apache.hugegraph.computer.core.graph.id.Id targetId, org.apache.hugegraph.computer.core.graph.value.Value value)voidwriteVertex(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex)
-
-
-
Method Detail
-
reachThreshold
public boolean reachThreshold()
-
isEmpty
public boolean isEmpty()
-
resetMessageWritten
public void resetMessageWritten()
-
messageWritten
public MessageStat messageWritten()
-
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()
-
-