Class DefaultUserChecker

    • Field Detail

      • CACHE_KEY

        public static final String CACHE_KEY
        since 5.10. Don't. Just don't.
    • Constructor Detail

      • DefaultUserChecker

        public DefaultUserChecker()
    • Method Detail

      • setLicenseCalculator

        public void setLicenseCalculator​(LicenseCalculator licenseCalculator)
      • getNumberOfRegisteredUsers

        public int getNumberOfRegisteredUsers()
        Returns cached value of the number of registered users. Computes it if it doesn't exist in cache (this may take a while for large user sets). The value is calculated in a separate (read-only) thread. Returns -1 if the value cannot be computed successfully (for compatibility with existing code).
        Specified by:
        getNumberOfRegisteredUsers in interface UserChecker
      • isUnlimitedUserLicense

        public boolean isUnlimitedUserLicense​(com.atlassian.extras.api.confluence.ConfluenceLicense license)
        since 5.10 Use ProductLicense.isUnlimitedNumberOfUsers()
      • isRunning

        public boolean isRunning()
      • incrementRegisteredUserCount

        public void incrementRegisteredUserCount()
        Increments the cached number of registered users. only does so if cached value has been computed.
        Specified by:
        incrementRegisteredUserCount in interface UserChecker
      • decrementRegisteredUserCount

        public void decrementRegisteredUserCount()
        Decrements the cached number of registered users.
        Specified by:
        decrementRegisteredUserCount in interface UserChecker
      • setLicenseService

        public void setLicenseService​(LicenseService licenseService)
      • setCacheFactory

        public void setCacheFactory​(com.atlassian.cache.CacheFactory cacheFactory)
        since 5.10
      • setRegisteredUsersCache

        public void setRegisteredUsersCache​(RegisteredUsersCache registeredUsersCache)