public interface

TicketContext

com.atlassian.bitbucket.throttle.TicketContext

Class Overview

Provides information about a ticket.

Note: The actual Ticket is not available from this context. Event handlers which receive this context on a TicketAcquiredEvent should not be able to release tickets.

Summary

Public Methods
void addReleaseCallback(Runnable callback)
Registers a task that is executed when the ticket is released.
@Nonnull String getResourceName()
Retrieves the name of the resource associated with the ticket.

Public Methods

public void addReleaseCallback (Runnable callback)

Registers a task that is executed when the ticket is released. If the ticket has already been released when the callback is added, the callback will be run immediately.

Parameters
callback a task to execute when the ticket is released

@Nonnull public String getResourceName ()

Retrieves the name of the resource associated with the ticket.

Returns
  • the resource name