Interface NetworkSequenceViewReader
-
public interface NetworkSequenceViewReaderSimple wrapper for the partition readerQueue iterator, which increments a sequence number for each returned buffer and remembers the receiver ID.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidacknowledgeAllRecordsProcessed()Acknowledges all the user records are processed.voidaddCredit(int creditDeltas)The credits from consumer are added in incremental way.ResultSubpartitionView.AvailabilityWithBackloggetAvailabilityAndBacklog()Checks whether this reader is available or not and returns the backlog at the same time.ThrowablegetFailureCause()InputChannel.BufferAndAvailabilitygetNextBuffer()InputChannelIDgetReceiverId()booleanisRegisteredAsAvailable()booleanisReleased()booleanneedAnnounceBacklog()Returns true if the producer backlog need to be announced to the consumer.voidnotifyNewBufferSize(int newBufferSize)voidnotifyRequiredSegmentId(int segmentId)Notify the id of required segment from consumer.voidreleaseAllResources()voidrequestSubpartitionView(ResultPartitionProvider partitionProvider, ResultPartitionID resultPartitionId, int subPartitionIndex)voidresumeConsumption()Resumes data consumption after an exactly once checkpoint.voidsetRegisteredAsAvailable(boolean isRegisteredAvailable)Updates the value to indicate whether the reader is enqueued in the pipeline or not.
-
-
-
Method Detail
-
requestSubpartitionView
void requestSubpartitionView(ResultPartitionProvider partitionProvider, ResultPartitionID resultPartitionId, int subPartitionIndex) throws IOException
- Throws:
IOException
-
getNextBuffer
@Nullable InputChannel.BufferAndAvailability getNextBuffer() throws IOException
- Throws:
IOException
-
needAnnounceBacklog
boolean needAnnounceBacklog()
Returns true if the producer backlog need to be announced to the consumer.
-
addCredit
void addCredit(int creditDeltas)
The credits from consumer are added in incremental way.- Parameters:
creditDeltas- The credit deltas
-
notifyRequiredSegmentId
void notifyRequiredSegmentId(int segmentId)
Notify the id of required segment from consumer.- Parameters:
segmentId- The id of required segment.
-
resumeConsumption
void resumeConsumption()
Resumes data consumption after an exactly once checkpoint.
-
acknowledgeAllRecordsProcessed
void acknowledgeAllRecordsProcessed()
Acknowledges all the user records are processed.
-
getAvailabilityAndBacklog
ResultSubpartitionView.AvailabilityWithBacklog getAvailabilityAndBacklog()
Checks whether this reader is available or not and returns the backlog at the same time.- Returns:
- A boolean flag indicating whether the reader is available together with the backlog.
-
isRegisteredAsAvailable
boolean isRegisteredAsAvailable()
-
setRegisteredAsAvailable
void setRegisteredAsAvailable(boolean isRegisteredAvailable)
Updates the value to indicate whether the reader is enqueued in the pipeline or not.- Parameters:
isRegisteredAvailable- True if this reader is already enqueued in the pipeline.
-
isReleased
boolean isReleased()
-
releaseAllResources
void releaseAllResources() throws IOException- Throws:
IOException
-
getFailureCause
Throwable getFailureCause()
-
getReceiverId
InputChannelID getReceiverId()
-
notifyNewBufferSize
void notifyNewBufferSize(int newBufferSize)
-
-