Class AbstractCollectResultBuffer<T>

java.lang.Object
org.apache.flink.streaming.api.operators.collect.AbstractCollectResultBuffer<T>
Direct Known Subclasses:
CheckpointedCollectResultBuffer, UncheckpointedCollectResultBuffer

public abstract class AbstractCollectResultBuffer<T> extends Object
A buffer which encapsulates the logic of dealing with the response from the CollectSinkFunction.
  • Constructor Details

    • AbstractCollectResultBuffer

      public AbstractCollectResultBuffer(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
  • Method Details

    • next

      public T next()
      Get next user visible result, returns null if currently there is no more.
    • getOffset

      public long getOffset()
    • getVersion

      public String 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.