question: public void releaseCapacity ( int capacityToRelease ) { if ( capacityToRelease <= 0 ) { return ; } List < Ticket > parentTicketsToRelease = new ArrayList < > ( ) ; mLock . lock ( ) ; try { if ( capacityToRelease > mCapacity ) { capacityToRelease = mCapacity ; } mCapacity -= capacityToRelease ; int numParentTicketsToRelease = Math . min ( mParentTickets . size ( ) , capacityToRelease ) ; for ( int i = 0 ; i < numParentTicketsToRelease ; i ++ ) { parentTicketsToRelease . add ( mParentTickets . remove ( ) ) ; } abortWaitersOnCapacityDecrease ( ) ; } finally { mLock . unlock ( ) ; } for ( Ticket ticket : parentTicketsToRelease ) { ticket . close ( ) ; } updateCurrentTicketCount ( ) ; }
target:  Releases the capacity to the parent ticket pool. Note that the tickets will be released as soon as possible. However, this is not necessarily immediately if there are tickets which have been acquired() by a user of this class, but not yet released.