Class StreamMultipleInputProcessor
- java.lang.Object
-
- org.apache.flink.streaming.runtime.io.StreamMultipleInputProcessor
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,AvailabilityProvider
,StreamInputProcessor
@Internal public final class StreamMultipleInputProcessor extends Object implements StreamInputProcessor
Input processor forMultipleInputStreamOperator
.
-
-
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
Constructors Constructor Description StreamMultipleInputProcessor(MultipleInputSelectionHandler inputSelectionHandler, StreamOneInputProcessor<?>[] inputProcessors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
CompletableFuture<?>
getAvailableFuture()
CompletableFuture<Void>
prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId)
DataInputStatus
processInput()
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, wait
-
Methods inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
isApproximatelyAvailable, isAvailable
-
-
-
-
Constructor Detail
-
StreamMultipleInputProcessor
public StreamMultipleInputProcessor(MultipleInputSelectionHandler inputSelectionHandler, StreamOneInputProcessor<?>[] inputProcessors)
-
-
Method Detail
-
getAvailableFuture
public CompletableFuture<?> getAvailableFuture()
- Specified by:
getAvailableFuture
in interfaceAvailabilityProvider
- Returns:
- a future that is completed if the respective provider is available.
-
processInput
public DataInputStatus processInput() throws Exception
Description copied from interface:StreamInputProcessor
In case of two and more input processors this method must callInputSelectable.nextSelection()
to choose which input to consume from next.- Specified by:
processInput
in 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
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
prepareSnapshot
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) throws CheckpointException
- Specified by:
prepareSnapshot
in interfaceStreamInputProcessor
- Throws:
CheckpointException
-
-