Package com.alibaba.graphscope.utils
Class AbstractMessageStore<T>
- java.lang.Object
-
- com.alibaba.graphscope.utils.AbstractMessageStore<T>
-
- All Implemented Interfaces:
PrimitiveArray<T>
,MessageStore<T>
,Serializable
- Direct Known Subclasses:
DoubleMessageStore
,IntMessageStore
,LongMessageStore
,ObjectMessageStore
public abstract class AbstractMessageStore<T> extends Object implements MessageStore<T>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected GraphXConf<?,?,?>
conf
protected com.alibaba.graphscope.graphx.utils.IdParser
idParser
protected int
ivnum
protected ThreadSafeBitSet
nextSet
protected FFIByteVectorOutputStream[]
outputStream
protected Vertex<Long>[]
tmpVertex
-
Constructor Summary
Constructors Constructor Description AbstractMessageStore(int fnum, int numCores, ThreadSafeBitSet nextSet, GraphXConf<?,?,?> conf, int ivnum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMessages(scala.collection.Iterator<scala.Tuple2<Long,T>> msgs, int threadId, com.alibaba.graphscope.graphx.graph.GSEdgeTripletImpl edgeTriplet, IFragment<Long,Long,?,?> fragment, int srcLid, int dstLid)
void
flushMessages(ThreadSafeBitSet nextSet, ParallelMessageManager messageManager, IFragment<Long,Long,?,?> fragment, int[] fid2WorkerId, ExecutorService executorService)
<MSG_T> void
sendMsgThroughIEdges(Vertex<Long> vertex, MSG_T msg, int threadId, ParallelMessageManager messageManager, IFragment<Long,Long,?,?> fragment)
we assume this function is thread safe-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.alibaba.graphscope.utils.MessageStore
digest, digest
-
-
-
-
Field Detail
-
nextSet
protected ThreadSafeBitSet nextSet
-
idParser
protected com.alibaba.graphscope.graphx.utils.IdParser idParser
-
outputStream
protected FFIByteVectorOutputStream[] outputStream
-
conf
protected GraphXConf<?,?,?> conf
-
ivnum
protected int ivnum
-
-
Constructor Detail
-
AbstractMessageStore
public AbstractMessageStore(int fnum, int numCores, ThreadSafeBitSet nextSet, GraphXConf<?,?,?> conf, int ivnum)
-
-
Method Detail
-
sendMsgThroughIEdges
public <MSG_T> void sendMsgThroughIEdges(Vertex<Long> vertex, MSG_T msg, int threadId, ParallelMessageManager messageManager, IFragment<Long,Long,?,?> fragment)
we assume this function is thread safe- Specified by:
sendMsgThroughIEdges
in interfaceMessageStore<T>
-
addMessages
public void addMessages(scala.collection.Iterator<scala.Tuple2<Long,T>> msgs, int threadId, com.alibaba.graphscope.graphx.graph.GSEdgeTripletImpl edgeTriplet, IFragment<Long,Long,?,?> fragment, int srcLid, int dstLid) throws InterruptedException
- Specified by:
addMessages
in interfaceMessageStore<T>
- Throws:
InterruptedException
-
flushMessages
public void flushMessages(ThreadSafeBitSet nextSet, ParallelMessageManager messageManager, IFragment<Long,Long,?,?> fragment, int[] fid2WorkerId, ExecutorService executorService) throws IOException
- Specified by:
flushMessages
in interfaceMessageStore<T>
- Throws:
IOException
-
-