Class StreamOneInputProcessor<IN>
- java.lang.Object
-
- org.apache.flink.streaming.runtime.io.StreamOneInputProcessor<IN>
-
- Type Parameters:
IN- The type of the record that can be read with this record reader.
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.flink.runtime.io.AvailabilityProvider,StreamInputProcessor
@Internal public final class StreamOneInputProcessor<IN> extends Object implements StreamInputProcessor
Input reader forOneInputStreamTask.
-
-
Constructor Summary
Constructors Constructor Description StreamOneInputProcessor(StreamTaskInput<IN> input, PushingAsyncDataInput.DataOutput<IN> output, BoundedMultiInput endOfInputAware)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CompletableFuture<?>getAvailableFuture()CompletableFuture<Void>prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId)DataInputStatusprocessInput()In case of two and more input processors this method must callInputSelectable.nextSelection()to choose which input to consume from next.
-
-
-
Constructor Detail
-
StreamOneInputProcessor
public StreamOneInputProcessor(StreamTaskInput<IN> input, PushingAsyncDataInput.DataOutput<IN> output, BoundedMultiInput endOfInputAware)
-
-
Method Detail
-
getAvailableFuture
public CompletableFuture<?> getAvailableFuture()
- Specified by:
getAvailableFuturein interfaceorg.apache.flink.runtime.io.AvailabilityProvider
-
processInput
public DataInputStatus processInput() throws Exception
Description copied from interface:StreamInputProcessorIn case of two and more input processors this method must callInputSelectable.nextSelection()to choose which input to consume from next.- Specified by:
processInputin interfaceStreamInputProcessor- Returns:
- input status to estimate whether more records can be processed immediately or not. If
there are no more records available at the moment and the caller should check finished
state and/or
AvailabilityProvider.getAvailableFuture(). - Throws:
Exception
-
prepareSnapshot
public CompletableFuture<Void> prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId) throws org.apache.flink.runtime.checkpoint.CheckpointException
- Specified by:
prepareSnapshotin interfaceStreamInputProcessor- Throws:
org.apache.flink.runtime.checkpoint.CheckpointException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-