Package com.atlassian.jira.license
Interface LicenseCountService
- All Known Implementing Classes:
DefaultApplicationRoleManager
@PublicApi
public interface LicenseCountService
Provides various counts of users in JIRA. Implementations are expected to cache the results of methods to ensure that
count look-ups are fast.
- Since:
- 6.5
-
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
Deprecated.void
Clear the cache for billable users.int
Gets the number of active users who currently count towards the license and should be charged for.
-
Method Details
-
totalBillableUsers
int totalBillableUsers()Gets the number of active users who currently count towards the license and should be charged for. This method should be used when determining user counts for billing purposes, such as purchase tier recommendations for plugins, and by plugins who wish to enforce tier-based licenses.Implementations of this method should take performance into consideration, and ensure that the value is cached. Use
flush()
to clear the cache.- Returns:
- the number of users in JIRA which currently count against at least one license
- See Also:
-
flush
Deprecated.useflushBillableUsersCache()
. Since v7.0. Eventually we want to remove this method in favour of the one with a more descriptive name.Clear the billable users cache. Note, despite the general name this clears only the billable users cache. Usually it is not necessary to call this method as implementors are expected to clear cached state in response to appropriate events. -
flushBillableUsersCache
void flushBillableUsersCache()Clear the cache for billable users. Usually it is not necessary to call this method as implementors are expected to clear cached state in response to appropriate events.
-
flushBillableUsersCache()
.