Class Communicator
- java.lang.Object
-
- com.alibaba.graphscope.communication.Communicator
-
- Direct Known Subclasses:
GiraphComputationAdaptor
,PageRank
public class Communicator extends Object
Communicator providing useful distributed aggregation methods such as min/min/sum.
-
-
Constructor Summary
Constructors Constructor Description Communicator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FFICommunicator
getFFICommunicator()
<MSG_T> void
max(MSG_T msgIn, MSG_T msgOut)
Obtain the max of msgIn among all distributed app instances, and put the result in msgOut.<MSG_T> void
min(MSG_T msgIn, MSG_T msgOut)
Obtain the min of msgIn among all distributed app instances, and put the result in msgOut.<MSG_T> void
sum(MSG_T msgIn, MSG_T msgOut)
Obtain the sum of msgIn among all distributed app instances, and put the result in msgOut.
-
-
-
Method Detail
-
getFFICommunicator
public FFICommunicator getFFICommunicator()
-
sum
public <MSG_T> void sum(MSG_T msgIn, MSG_T msgOut)
Obtain the sum of msgIn among all distributed app instances, and put the result in msgOut. MSG_T should be a sub class of FFIMirror.
-
min
public <MSG_T> void min(MSG_T msgIn, MSG_T msgOut)
Obtain the min of msgIn among all distributed app instances, and put the result in msgOut. MSG_T should be a sub class of FFIMirror.
-
max
public <MSG_T> void max(MSG_T msgIn, MSG_T msgOut)
Obtain the max of msgIn among all distributed app instances, and put the result in msgOut. MSG_T should be a sub class of FFIMirror.- Type Parameters:
MSG_T
- msg type, should be a FFIMirror, DoubleMsg or LongMsg.- Parameters:
msgIn
- data to be aggregated.msgOut
- placeholder to received the result.
-
-