Interface RepoUsageComponent

  • All Known Implementing Classes:
    RepoUsageComponentImpl

    public interface RepoUsageComponent
    Low-level interface to answer repository usage queries
    Since:
    3.5
    Author:
    Derek Hulley
    • Method Detail

      • setRestrictions

        void setRestrictions​(RepoUsage restrictions)
        Record changes to the restrictions imposed on the repository. These may be cached for fast access. This method should only be called if the current restrictions have changed.
        Parameters:
        restrictions - the new restrictions imposed on the repository
      • getRestrictions

        RepoUsage getRestrictions()
        Returns:
        Returns the restrictions currently in play for the repository
      • updateUsage

        boolean updateUsage​(RepoUsage.UsageType usageType)
        Force an update of the current repository usage. Usage data will be gathered and stored as required.
        Parameters:
        usageType - the type of usage data that must be updated
        Returns:
        true if the update succeeded or false if some other client was already performing the same update
      • resetUsage

        boolean resetUsage​(RepoUsage.UsageType usageType)
        Force a reset of the current repository usage. Usage data will be zero'd
        Parameters:
        usageType - the type of usage data that must be reset
        Returns:
        true if the reset succeeded or false if some other client was already performing the same reset
      • getUsage

        RepoUsage getUsage()
        Get the current repository usage data. This will not trigger an update of the data if it is not available; only pre-loaded data will be used.
        Returns:
        Returns the repository-specific current usage data.
      • getUsageStatus

        RepoUsageStatus getUsageStatus()
        Calculate and retrieve full status alerts based on the usage and license expiry state.
        Returns:
        Returns the usage status bean