code: public void setNumDesignatedBuffers(int numDesignatedBuffers) {
  		synchronized (this.buffers) {
  			this.numDesignatedBuffers = numDesignatedBuffers;
  
  			// Return excess buffers to global buffer pool
  			while (this.numRequestedBuffers > this.numDesignatedBuffers) {
  				if (this.buffers.isEmpty()) {
  					break;
  				}
  
  				this.globalBufferPool.returnBuffer(this.buffers.poll());
  				this.numRequestedBuffers--;
  			}
  
  			this.buffers.notify();
  		}
  	}
docs: Sets the designated number of buffers for this local buffer pool and returns excess buffers to the global buffer
  pool.
  <p>
  The designated number of buffers determines how many buffers this buffer pool is allowed to manage. New buffers
  can only be requested, if the requested number of buffers is less than the designated number. If possible, excess
  buffers will be returned to the global buffer pool.
  
  @param numDesignatedBuffers number of buffers designated for this local buffer pool