public abstract class KGatherStreamingReceiver extends KeyedReceiver
Modifier and Type | Field and Description |
---|---|
protected int |
localWindowCount
variable used to keep track of the current local window count.
|
protected int |
windowSize
Streaming messages are only kept until the window size is met.
|
batchDone, dataFlowOperation, destination, executor, finishedSources, isEmptySent, isFinalBatchReceiver, keyLimit, limitPerKey, messages, representSource, representSourceSet, sendQueue, thisSources
Constructor and Description |
---|
KGatherStreamingReceiver() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isAllQueuesEmpty(java.util.Queue<java.lang.Object> targetSendQueue)
checks if the queue structures used to send data is empty.
|
protected boolean |
offerMessage(int target,
java.lang.Object object)
saves the given message (or messages if the object is a list) into the messages data structure
if possible and rejects the message if the whole message cannot be added to the messages
data structure.
|
protected boolean |
sendToTarget(boolean needsFurtherProgress,
boolean sourcesFinished,
int target,
java.util.Queue<java.lang.Object> targetSendQueue)
Called from the progress method to perform the communication calls to send the queued messages
|
checkIfEmptyIsSent, finishProgress, init, isComplete, isSourcesFinished, moveMessagesToSendQueue, moveMessageToSendQueue, onFinish, onMessage, progress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clean, close, onMessage
protected int windowSize
protected int localWindowCount
protected boolean isAllQueuesEmpty(java.util.Queue<java.lang.Object> targetSendQueue)
isAllQueuesEmpty
in class KeyedReceiver
targetSendQueue
- message queue for the current targetprotected boolean offerMessage(int target, java.lang.Object object)
offerMessage
in class KeyedReceiver
target
- target for which the messages are to be addedobject
- the message/messages to be addedprotected boolean sendToTarget(boolean needsFurtherProgress, boolean sourcesFinished, int target, java.util.Queue<java.lang.Object> targetSendQueue)
KeyedReceiver
sendToTarget
in class KeyedReceiver
needsFurtherProgress
- current state of needsFurtherProgress valuesourcesFinished
- specifies if the sources have completedtarget
- the target(which is a source in this instance) from which the messages are senttargetSendQueue
- the data structure that contains all the message data