public class

ReadOnlyLicenseCalculator

extends Object
implements LicenseCalculator
java.lang.Object
   ↳ com.atlassian.confluence.util.ReadOnlyLicenseCalculator

Class Overview

Calculates the number of Users in a Confluence instance. Performs the calculation in a separate thread using a read only transaction.

Summary

Public Constructors
ReadOnlyLicenseCalculator(TransactionExecutor<Integer> executor)
Public Methods
Integer getNumberOfLicensedUsers()
Returns the number of users in the Confluence instance
boolean isRunning()
Whether or not the license calculator is currently computing the number of users in the system.
void setCacheFactory(CacheFactory cacheFactory)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.util.LicenseCalculator

Public Constructors

public ReadOnlyLicenseCalculator (TransactionExecutor<Integer> executor)

Public Methods

public Integer getNumberOfLicensedUsers ()

Returns the number of users in the Confluence instance

Returns
  • the number of users, or -1 if a timeout occurs (for compatibility with existing code)

public boolean isRunning ()

Whether or not the license calculator is currently computing the number of users in the system.

Returns
  • true/false

public void setCacheFactory (CacheFactory cacheFactory)