public class BcastBatchFinalReceiver extends TargetFinalReceiver
barriers, stateCleared, syncReceived, targetStatesdestination, groupingSize, highWaterMark, lock, messages, operation, representSource, syncState, targets, thisDestinations, thisSources, workerId| Constructor and Description | 
|---|
BcastBatchFinalReceiver(SingularReceiver receiver)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addMessage(int target,
          java.util.List<java.lang.Object> msgQueue,
          java.lang.Object value)  | 
protected void | 
addSyncMessage(int source,
              int target)
Add a sync message 
 | 
protected void | 
addSyncMessageBarrier(int source,
                     int target,
                     byte[] barrier)
Add a sync message 
 | 
void | 
init(Config cfg,
    DataFlowOperation operation,
    java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
Initialize the message receiver with tasks from which messages are expected
 For each sub edge in graph, for each path, gives the expected task ids 
 | 
protected boolean | 
isAllEmpty(int target)  | 
protected boolean | 
isFilledToSend(int target)
Return true if we are filled to send 
 | 
protected void | 
merge(int dest,
     java.util.List<java.lang.Object> dests)
Swap the messages to the ready queue 
 | 
protected boolean | 
onSyncEvent(int target,
           byte[] value)
This method is called when there is a sync event on the operation 
 | 
protected boolean | 
sendToTarget(int source,
            int target)
Send the values to a target 
 | 
canAcceptMessage, clean, isComplete, progress, syncclearTarget, onMessageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, onMessagepublic BcastBatchFinalReceiver(SingularReceiver receiver)
public void init(Config cfg, DataFlowOperation operation, java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
MessageReceivertarget -> source tasks
init in interface MessageReceiverinit in class TargetFinalReceiverexpectedIds - expected task idsprotected void merge(int dest,
                     java.util.List<java.lang.Object> dests)
merge in class TargetReceiverdest - the targetdests - message queue to switch to readyprotected void addSyncMessage(int source,
                              int target)
TargetReceiveraddSyncMessage in class TargetFinalReceiversource - sourcetarget - targetprotected void addSyncMessageBarrier(int source,
                                     int target,
                                     byte[] barrier)
TargetReceiveraddSyncMessageBarrier in class TargetFinalReceiversource - sourcetarget - targetbarrier - the barrier messageprotected void addMessage(int target,
                          java.util.List<java.lang.Object> msgQueue,
                          java.lang.Object value)
addMessage in class TargetReceiverprotected boolean isAllEmpty(int target)
isAllEmpty in class TargetFinalReceiverprotected boolean sendToTarget(int source,
                               int target)
TargetReceiversendToTarget in class TargetReceiversource - the sourcestarget - the targetprotected boolean isFilledToSend(int target)
TargetReceiverisFilledToSend in class TargetReceiverprotected boolean onSyncEvent(int target,
                              byte[] value)
TargetReceiveronSyncEvent in class TargetReceivertarget - the target to which the sync event belongvalue - the byte value, can be null