Package com.atlassian.confluence.util
Class ReadOnlyLicenseCalculator
- java.lang.Object
-
- com.atlassian.confluence.util.ReadOnlyLicenseCalculator
-
- All Implemented Interfaces:
LicenseCalculator
public class ReadOnlyLicenseCalculator extends Object implements LicenseCalculator
Calculates the number of Users in a Confluence instance. Performs the calculation in a separate thread using a read only transaction.
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyLicenseCalculator(RegisteredUsersCache registeredUsersCache, TransactionExecutor<Integer> executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IntegergetNumberOfLicensedUsers()Returns the number of users in the Confluence instancebooleanisRunning()Whether or not the license calculator is currently computing the number of users in the system.voidsetCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)Deprecated.since 5.10.
-
-
-
Constructor Detail
-
ReadOnlyLicenseCalculator
public ReadOnlyLicenseCalculator(RegisteredUsersCache registeredUsersCache, TransactionExecutor<Integer> executor)
-
-
Method Detail
-
isRunning
public boolean isRunning()
Description copied from interface:LicenseCalculatorWhether or not the license calculator is currently computing the number of users in the system.- Specified by:
isRunningin interfaceLicenseCalculator- Returns:
- true/false
-
getNumberOfLicensedUsers
public Integer getNumberOfLicensedUsers()
Description copied from interface:LicenseCalculatorReturns the number of users in the Confluence instance- Specified by:
getNumberOfLicensedUsersin interfaceLicenseCalculator- Returns:
- the number of users, or -1 if a timeout occurs (for compatibility with existing code)
-
setCacheFactory
@Deprecated public void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
Deprecated.since 5.10.
-
-