| com.atlassian.bitbucket.throttle.ThrottleService | 
Manages buckets of Tickets which may be used to throttle access to named resources. The exact semantics by
 which tickets are managed is not guaranteed by this interface, but it does have certain contracts:
 
bitbucket.propertiesResourceBusyException shall be thrown
     indicating the resource is busyExecutorService threads, it is the acquirer's
 obligation to ensure the ticket is released. The system will attempt to detect such "lost" tickets and release them,
 but such detection is "best effort" and may not be foolproof. In general, calling code should follow an approach
 similar to:
 
 Ticket ticket = throttleService.acquireTicket("resourceName");
 try {
     //Do protected, resource-intensive operation
 } finally {
     ticket.release();
 }
 | Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Acquires a ticket for accessing the specified resource. | |||||||||||
Acquires a ticket for accessing the specified resource.
 Successful acquisition of a ticket indicates that the named resource should have sufficient capacity to service
 a single, full request. This means a ticket may be acquired once and held while multiple operations are
 performed on the gated resource. Callers should use finally blocks to ensure the ticket is released when
 they are finished using the gated resource. The system makes a best effort attempt to detect and release
 "lost" tickets when a server request ends, but it is best for callers to explicitly manage their own tickets as
 such detection may not catch all cases.
 
 The returned Ticket will never be null. If no tickets are available for the requested resource,
 a ResourceBusyException will be thrown.
| resourceName | the resource for which the ticket should be acquired | 
|---|
| ResourceBusyException | if a ticket cannot be acquired from the named bucket | 
|---|