public void assignExclusiveSegments ( NetworkBufferPool networkBufferPool , int networkBuffersPerChannel ) throws IOException { checkState ( this . isCreditBased , "Bug in input gate setup logic: exclusive buffers only exist with credit-based flow control." ) ; checkState ( this . networkBufferPool == null , "Bug in input gate setup logic: global buffer pool has" + "already been set for this input gate." ) ; this . networkBufferPool = checkNotNull ( networkBufferPool ) ; this . networkBuffersPerChannel = networkBuffersPerChannel ; synchronized ( requestLock ) { for ( InputChannel inputChannel : inputChannels . values ( ) ) { if ( inputChannel instanceof RemoteInputChannel ) { ( ( RemoteInputChannel ) inputChannel ) . assignExclusiveSegments ( networkBufferPool . requestMemorySegments ( networkBuffersPerChannel ) ) ; } } } }
Assign the exclusive buffers to all remote input channels directly for credit - based mode .