Searched refs:tickets (Results 1 – 5 of 5) sorted by relevance
172 public Collection<Ticket> acquire(int tickets) throws InterruptedException, in acquire() argument174 Collection<Ticket> acquiredParentTickets = acquireParentTickets(tickets); in acquire()215 Collection<Ticket> tickets = mParentPool.acquire(additionalCapacity); in reserveCapacity() local221 for (Ticket ticket : tickets) { in reserveCapacity()296 private Collection<Ticket> acquireParentTickets(int tickets) throws InterruptedException, in acquireParentTickets() argument305 acquiredParentTickets = tryAcquireAtomically(tickets); in acquireParentTickets()307 Waiter thisWaiter = new Waiter(mLock.newCondition(), tickets); in acquireParentTickets()313 acquiredParentTickets = tryAcquireAtomically(tickets); in acquireParentTickets()335 private List<Ticket> tryAcquireAtomically(int tickets) throws NoCapacityAvailableException { in tryAcquireAtomically() argument339 if (tickets > mCapacity) { in tryAcquireAtomically()[all …]
118 public Collection<Ticket> acquire(int tickets) throws InterruptedException, in acquire() argument122 if (tickets > mMaxCapacity || tickets < 0) { in acquire()125 Waiter thisWaiter = new Waiter(tickets, mLock.newCondition()); in acquire()129 while (mTickets < tickets && !mClosed) { in acquire()136 mTickets -= tickets; in acquire()141 for (int i = 0; i < tickets; i++) { in acquire()
47 public Collection<Ticket> acquire(int tickets) throws InterruptedException, in acquire() argument
158 public Collection<Ticket> acquire(int tickets) throws InterruptedException, in acquire() argument165 return mTicketPool.acquire(tickets); in acquire()