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,AvailabilityProvider,StreamInputProcessor
@Internal
public final class StreamOneInputProcessor<IN>
extends Object
implements StreamInputProcessor
Input reader for
OneInputStreamTask.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AvailabilityProvider.AvailabilityHelper -
Field Summary
Fields inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AVAILABLE -
Constructor Summary
ConstructorsConstructorDescriptionStreamOneInputProcessor(StreamTaskInput<IN> input, PushingAsyncDataInput.DataOutput<IN> output, BoundedMultiInput endOfInputAware) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) In case of two and more input processors this method must callInputSelectable.nextSelection()to choose which input to consume from next.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
isApproximatelyAvailable, isAvailable
-
Constructor Details
-
StreamOneInputProcessor
public StreamOneInputProcessor(StreamTaskInput<IN> input, PushingAsyncDataInput.DataOutput<IN> output, BoundedMultiInput endOfInputAware)
-
-
Method Details
-
getAvailableFuture
- Specified by:
getAvailableFuturein interfaceAvailabilityProvider- Returns:
- a future that is completed if the respective provider is available.
-
processInput
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(ChannelStateWriter channelStateWriter, long checkpointId) throws CheckpointException - Specified by:
prepareSnapshotin interfaceStreamInputProcessor- Throws:
CheckpointException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-