class SingleInputGate extends IndexedInputGate {

	@Override
	public CompletableFuture<?> readRecoveredState(ExecutorService executor, ChannelStateReader reader) throws IOException {
		synchronized (requestLock) {
			if (closeFuture.isDone()) {
				return FutureUtils.completedVoidFuture();
			}
			for (InputChannel inputChannel : inputChannels.values()) {
				if (inputChannel instanceof RecoveredInputChannel) {
					((RecoveredInputChannel) inputChannel).assignExclusiveSegments();
				}
			}
		}

		List<CompletableFuture<?>> futures = getStateConsumedFuture();

		executor.submit(() -> {
			Collection<InputChannel> channels;
			synchronized (requestLock) {
				channels = inputChannels.values();
			}
			internalReadRecoveredState(reader, channels);
		});

		return CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]));
	}

	public  SingleInputGate(
		String owningTaskName,
		int gateIndex,
		IntermediateDataSetID consumedResultId,
		final ResultPartitionType consumedPartitionType,
		int consumedSubpartitionIndex,
		int numberOfInputChannels,
		PartitionProducerStateProvider partitionProducerStateProvider,
		SupplierWithException<BufferPool, IOException> bufferPoolFactory,
		@Nullable BufferDecompressor bufferDecompressor,
		MemorySegmentProvider memorySegmentProvider);

}