- Type Parameters:
OUT
- Type of the output elements of this source.
SRC
- Type of the source function for the stream source operator
OP
- Type of the stream source operator
- All Implemented Interfaces:
- StatefulTask<StreamTaskStateList>
- Direct Known Subclasses:
- StoppableSourceStreamTask
@Internal
public class SourceStreamTask<OUT,SRC extends SourceFunction<OUT>,OP extends StreamSource<OUT,SRC>>
extends StreamTask<OUT,OP>
Task for executing streaming sources.
One important aspect of this is that the checkpointing and the emission of elements must never
occur at the same time. The execution must be serial. This is achieved by having the contract
with the StreamFunction that it must only modify its state or emit elements in
a synchronized block that locks on the lock Object. Also, the modification of the state
and the emission of elements must happen in the same block of code that is protected by the
synchronized block.