class SingleInputGate extends IndexedInputGate {

	public void setInputChannels(InputChannel... channels) {
		if (channels.length != numberOfInputChannels) {
			throw new IllegalArgumentException("Expected " + numberOfInputChannels + " channels, " +
				"but got " + channels.length);
		}
		synchronized (requestLock) {
			System.arraycopy(channels, 0, this.channels, 0, numberOfInputChannels);
			for (InputChannel inputChannel : channels) {
				IntermediateResultPartitionID partitionId = inputChannel.getPartitionId().getPartitionId();
				if (inputChannels.put(partitionId, inputChannel) == null
					&& inputChannel instanceof UnknownInputChannel) {

					numberOfUninitializedChannels++;
				}
			}
		}
	}

	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);

}