Class Communicator

    • Constructor Detail

      • Communicator

        public Communicator()
    • Method Detail

      • 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.
        Type Parameters:
        MSG_T - msg type, should be a FFIMirror, DoubleMsg or LongMsg
        Parameters:
        msgIn - data to be aggregated.
        msgOut - placeholder to receive the result.
        See Also:
        FFIMirror, DoubleMsg, LongMsg
      • 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.
        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.
        See Also:
        FFIMirror, DoubleMsg, LongMsg
      • 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.