com.atlassian.confluence.util
Class ReadOnlyLicenseCalculator

java.lang.Object
  extended by com.atlassian.confluence.util.ReadOnlyLicenseCalculator
All Implemented Interfaces:
LicenseCalculator

public class ReadOnlyLicenseCalculator
extends java.lang.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
ReadOnlyLicenseCalculator(TransactionExecutor<java.lang.Integer> executor)
           
 
Method Summary
 java.lang.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(com.atlassian.cache.CacheFactory cacheFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyLicenseCalculator

public ReadOnlyLicenseCalculator(TransactionExecutor<java.lang.Integer> executor)
Method Detail

isRunning

public boolean isRunning()
Description copied from interface: LicenseCalculator
Whether or not the license calculator is currently computing the number of users in the system.

Specified by:
isRunning in interface LicenseCalculator
Returns:
true/false

getNumberOfLicensedUsers

public java.lang.Integer getNumberOfLicensedUsers()
Description copied from interface: LicenseCalculator
Returns the number of users in the Confluence instance

Specified by:
getNumberOfLicensedUsers in interface LicenseCalculator
Returns:
the number of users, or -1 if a timeout occurs (for compatibility with existing code)

setCacheFactory

public void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)


Copyright © 2003-2014 Atlassian. All Rights Reserved.