Package com.alibaba.graphscope.parallel
Interface ParallelMessageManager
- 
- All Superinterfaces:
- com.alibaba.fastffi.FFIPointer,- FFIType,- MessageManagerBase,- Serializable
 - All Known Subinterfaces:
- ParallelMessageManagerGen
 - All Known Implementing Classes:
- ParallelMessageManagerGen_cxx_0x5a835738
 
 public interface ParallelMessageManager extends MessageManagerBase The parallel message manager, used in serial appsParallelAppBase.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @com.alibaba.fastffi.FFINameAlias("GetMessageInBuffer") booleangetMessageInBuffer(MessageInBuffer buf)Retrieve a message archive.voidinitChannels(int channel_num)Init the message manager which number of possible channels.default <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T>
 voidparallelProcess(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, int threadNum, ExecutorService executor, Supplier<MSG_T> msgSupplier, BiConsumer<Vertex<VID_T>,MSG_T> consumer)Parallel processing the messages received from last super step.default <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T>
 booleansendMsgThroughEdges(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId)<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsendMsgThroughEdgesArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send the a vertex's data to other fragment through incoming and outgoing edges.<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsendMsgThroughEdgesImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send the a vertex's data to other fragment through incoming and outgoing edges.default <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T>
 booleansendMsgThroughIEdges(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId)<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsendMsgThroughIEdgesArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send the a vertex's data to other fragment through incoming edges.<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsendMsgThroughIEdgesImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send the a vertex's data to other fragment through incoming edges.default <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T>
 booleansendMsgThroughOEdges(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId)<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsendMsgThroughOEdgesArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send the a vertex's data to other fragment through outgoing edges.<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsendMsgThroughOEdgesImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send the a vertex's data to other fragment through outgoing edges.<MSG_T> voidsendToFragment(int dstFid, MSG_T msg, int channelId)default <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T>
 booleansyncStateOnOuterVertex(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId)<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsyncStateOnOuterVertexArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send a msg to the fragment where the querying outer vertex is an inner vertexin another fragment.<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,UNUSED_T>
 voidsyncStateOnOuterVertexArrowProjectedNoMsg(FRAG_T frag, Vertex<VID_T> vertex, int channel_id, UNUSED_T vdata)SyncState on outer vertex without message, used in bfs etc.<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T>
 voidsyncStateOnOuterVertexImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused)Send a msg to the fragment where the querying outer vertex is an inner vertexin another fragment.<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,UNUSED_T>
 voidsyncStateOnOuterVertexImmutableNoMsg(FRAG_T frag, Vertex<VID_T> vertex, int channel_id, UNUSED_T vdata)SyncState on outer vertex without message, used in bfs etc.default <OID_T,VID_T,VDATA_T,EDATA_T>
 booleansyncStateOnOuterVertexNoMsg(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, int channelId)- 
Methods inherited from interface com.alibaba.graphscope.parallel.MessageManagerBasefinishARound, forceContinue, getMsgSize, start, startARound, toTerminate
 
- 
 
- 
- 
- 
Method Detail- 
syncStateOnOuterVertexdefault <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T> boolean syncStateOnOuterVertex(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId) 
 - 
syncStateOnOuterVertexNoMsgdefault <OID_T,VID_T,VDATA_T,EDATA_T> boolean syncStateOnOuterVertexNoMsg(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, int channelId) 
 - 
sendMsgThroughOEdgesdefault <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T> boolean sendMsgThroughOEdges(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId) 
 - 
sendMsgThroughEdgesdefault <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T> boolean sendMsgThroughEdges(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId) 
 - 
sendMsgThroughIEdgesdefault <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T> boolean sendMsgThroughIEdges(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, Vertex<VID_T> vertex, MSG_T msg, int channelId) 
 - 
initChannelsvoid initChannels(int channel_num) Init the message manager which number of possible channels. Each channel will swap messages in parallel.- Parameters:
- channel_num- number of channels.
 
 - 
getMessageInBuffer@com.alibaba.fastffi.FFINameAlias("GetMessageInBuffer") boolean getMessageInBuffer(MessageInBuffer buf)Retrieve a message archive.- Parameters:
- buf- place to store the archive.
- Returns:
- true if got one.
 
 - 
sendToFragment<MSG_T> void sendToFragment(int dstFid, MSG_T msg, int channelId)
 - 
syncStateOnOuterVertexImmutable<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void syncStateOnOuterVertexImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send a msg to the fragment where the querying outer vertex is an inner vertexin another fragment.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ImmutableEdgeCutFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel id.
 
 - 
syncStateOnOuterVertexArrowProjected<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void syncStateOnOuterVertexArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send a msg to the fragment where the querying outer vertex is an inner vertexin another fragment.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ArrowProjectedFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel id.
 
 - 
syncStateOnOuterVertexImmutableNoMsg<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,UNUSED_T> void syncStateOnOuterVertexImmutableNoMsg(FRAG_T frag, Vertex<VID_T> vertex, int channel_id, UNUSED_T vdata) SyncState on outer vertex without message, used in bfs etc.- Parameters:
- frag- fragment.
- vertex- query vertex.
- channel_id- message channel id.
 
 - 
syncStateOnOuterVertexArrowProjectedNoMsg<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,UNUSED_T> void syncStateOnOuterVertexArrowProjectedNoMsg(FRAG_T frag, Vertex<VID_T> vertex, int channel_id, UNUSED_T vdata) SyncState on outer vertex without message, used in bfs etc.- Parameters:
- frag- fragment.
- vertex- query vertex.
- channel_id- message channel id.
 
 - 
sendMsgThroughOEdgesImmutable<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void sendMsgThroughOEdgesImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send the a vertex's data to other fragment through outgoing edges.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ImmutableEdgeCutFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel_id
 
 - 
sendMsgThroughOEdgesArrowProjected<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void sendMsgThroughOEdgesArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send the a vertex's data to other fragment through outgoing edges.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ArrowProjectedFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel_id.
 
 - 
sendMsgThroughEdgesImmutable<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void sendMsgThroughEdgesImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send the a vertex's data to other fragment through incoming and outgoing edges.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ImmutableEdgecutFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel_id.
 
 - 
sendMsgThroughEdgesArrowProjected<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void sendMsgThroughEdgesArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send the a vertex's data to other fragment through incoming and outgoing edges.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ArrowProjectedFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel_id.
 
 - 
sendMsgThroughIEdgesImmutable<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ImmutableEdgecutFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void sendMsgThroughIEdgesImmutable(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send the a vertex's data to other fragment through incoming edges.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ImmutableEdgecutFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel_id.
 
 - 
sendMsgThroughIEdgesArrowProjected<OID_T,VID_T,VDATA_T,EDATA_T,FRAG_T extends ArrowProjectedFragment<OID_T,VID_T,VDATA_T,EDATA_T>,MSG_T,UNUSED_T> void sendMsgThroughIEdgesArrowProjected(FRAG_T frag, Vertex<VID_T> vertex, MSG_T msg, int channel_id, UNUSED_T unused) Send the a vertex's data to other fragment through incoming edges.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- ArrowProjectedFragment.
- vertex- querying vertex.
- msg- msg to send.
- channel_id- channel_id.
 
 - 
parallelProcessdefault <OID_T,VID_T,VDATA_T,EDATA_T,MSG_T> void parallelProcess(IFragment<OID_T,VID_T,VDATA_T,EDATA_T> frag, int threadNum, ExecutorService executor, Supplier<MSG_T> msgSupplier, BiConsumer<Vertex<VID_T>,MSG_T> consumer) Parallel processing the messages received from last super step. The user just need to provide a lambda consumer.- Type Parameters:
- MSG_T- message type.
- Parameters:
- frag- fragment.
- threadNum- number of threads to use.
- executor- thread pool executor.
- msgSupplier- a producer function creating a msg instance.
- consumer- lambda function.
 
 
- 
 
-