public void reserveCapacity(int additionalCapacity) throws InterruptedException, NoCapacityAvailableException {
  Collection<Ticket> tickets=mParentPool.acquire(additionalCapacity);
  mLock.lock();
  try {
    mCapacity+=additionalCapacity;
    for (    Ticket ticket : tickets) {
      mParentTickets.add(ticket);
    }
    releaseWaitersOnTicketAvailability();
  }
  finally {
    mLock.unlock();
  }
  updateCurrentTicketCount();
}

public void reserveCapacity ( int additionalCapacity ) throws InterruptedException , NoCapacityAvailableException { Collection < Ticket > tickets = mParentPool . acquire ( additionalCapacity ) ; mLock . lock ( ) ; try { mCapacity += additionalCapacity ; for ( Ticket ticket : tickets ) { mParentTickets . add ( ticket ) ; } releaseWaitersOnTicketAvailability ( ) ; } finally { mLock . unlock ( ) ; } updateCurrentTicketCount ( ) ; }
reserves tickets from the parent pool .
