Package org.alfresco.repo.usage
Interface RepoUsageComponent
- All Known Implementing Classes:
RepoUsageComponentImpl
public interface RepoUsageComponent
Low-level interface to answer repository usage queries
- Since:
- 3.5
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for observers of repository restriction changes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetUsage()Get the current repository usage data.Calculate and retrieve full status alerts based on the usage and license expiry state.voidObserve when restrictions changebooleanresetUsage(RepoUsage.UsageType usageType) Force a reset of the current repository usage.voidsetRestrictions(RepoUsage restrictions) Record changes to the restrictions imposed on the repository.booleanupdateUsage(RepoUsage.UsageType usageType) Force an update of the current repository usage.
-
Field Details
-
KEY_USAGE_ROOT
- See Also:
-
KEY_USAGE_CURRENT
- See Also:
-
KEY_USAGE_LAST_UPDATE_USERS
- See Also:
-
KEY_USAGE_USERS
- See Also:
-
KEY_USAGE_LAST_UPDATE_DOCUMENTS
- See Also:
-
KEY_USAGE_DOCUMENTS
- See Also:
-
-
Method Details
-
observeRestrictions
Observe when restrictions change -
setRestrictions
Record changes to the restrictions imposed on the repository. These may be cached for fast access. This method should only be called if thecurrent restrictionshave changed.- Parameters:
restrictions- the new restrictions imposed on the repository
-
getRestrictions
RepoUsage getRestrictions()- Returns:
- Returns the restrictions currently in play for the repository
-
updateUsage
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
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
-