public int availableInProcess(){
  return Math.max(0,maxInProcess - pending.size());
}

public int availableInProcess ( ) { return Math . max ( 0 , maxInProcess - pending . size ( ) ) ; }
a connection can only have so many things in process happening on it at once , where " in process " refers to the maximum number of in - process requests less the number of pending responses .
