Class AbstractCollectResultBuffer<T>
java.lang.Object
org.apache.flink.streaming.api.operators.collect.AbstractCollectResultBuffer<T>
- Direct Known Subclasses:
CheckpointedCollectResultBuffer,UncheckpointedCollectResultBuffer
A buffer which encapsulates the logic of dealing with the response from the
CollectSinkFunction.-
Constructor Summary
ConstructorsConstructorDescriptionAbstractCollectResultBuffer(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()voiddealWithResponse(CollectCoordinationResponse response, long responseOffset) longprotected abstract voidmaintainVisibility(long currentVisiblePos, long lastCheckpointedOffset) protected voidmakeResultsVisible(long visiblePos) next()Get next user visible result, returns null if currently there is no more.protected voidreset()Clear the whole buffer and discard all results.protected voidrevert(long checkpointedOffset) Revert the buffer back to the result whose offset is `checkpointedOffset`.protected abstract voidsinkRestarted(long lastCheckpointedOffset)
-
Constructor Details
-
AbstractCollectResultBuffer
public AbstractCollectResultBuffer(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
-
-
Method Details
-
next
Get next user visible result, returns null if currently there is no more. -
getOffset
public long getOffset() -
getVersion
-
dealWithResponse
public void dealWithResponse(CollectCoordinationResponse response, long responseOffset) throws IOException - Throws:
IOException
-
complete
public void complete() -
sinkRestarted
protected abstract void sinkRestarted(long lastCheckpointedOffset) -
maintainVisibility
protected abstract void maintainVisibility(long currentVisiblePos, long lastCheckpointedOffset) -
makeResultsVisible
protected void makeResultsVisible(long visiblePos) -
revert
protected void revert(long checkpointedOffset) Revert the buffer back to the result whose offset is `checkpointedOffset`. -
reset
protected void reset()Clear the whole buffer and discard all results.
-