code: public void close() throws IOException, InterruptedException {
  
  		for (int i = 0; i < this.getNumberOfInputChannels(); i++) {
  			final InputChannel<T> inputChannel = this.channels[i];
  			inputChannel.close();
  		}
  
  	}
docs: Immediately closes the input gate and all its input channels. The corresponding
  output channels are notified. Any remaining records in any buffers or queue is considered
  irrelevant and is discarded.
  
  @throws IOException
  thrown if an I/O error occurs while closing the gate
  @throws InterruptedException
  thrown if the thread is interrupted while waiting for the gate to be closed