Package org.alfresco.service.cmr.admin
Class RepoUsage
- java.lang.Object
-
- org.alfresco.service.cmr.admin.RepoUsage
-
public class RepoUsage extends java.lang.ObjectBean holding the known or unknown usage values of the repository.- Since:
- 3.4
- Author:
- Derek Hulley
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRepoUsage.LicenseModeEnumeration of the server license modes.static classRepoUsage.UsageTypeEnumeration of the common usage types
-
Constructor Summary
Constructors Constructor Description RepoUsage(java.lang.Long lastUpdate, java.lang.Long users, java.lang.Long documents, RepoUsage.LicenseMode licenseMode, java.lang.Long licenseExpiryDate, boolean readOnly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.LonggetDocuments()Get the number of documents or null if not knownjava.lang.LonggetLastUpdate()Get the time (ms since epoch) that the repository usage was last updated.java.lang.LonggetLicenseExpiryDate()Get the server license expiry date.RepoUsage.LicenseModegetLicenseMode()Get the server license mode.java.lang.LonggetUsers()Get the number of users or null if unknownbooleanisReadOnly()Get the read-write state of the repositoryjava.lang.StringtoString()
-
-
-
Constructor Detail
-
RepoUsage
public RepoUsage(java.lang.Long lastUpdate, java.lang.Long users, java.lang.Long documents, RepoUsage.LicenseMode licenseMode, java.lang.Long licenseExpiryDate, boolean readOnly)- Parameters:
lastUpdate- the time the repository usage was last updatedusers- the number of users or null if not knowndocuments- the number of documents or null if not knownlicenseMode- the server license mode in effect at runtimelicenseExpiryDate- the date that the license expires or null if it doesn'treadOnly- true if the server is currently read-only
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getLastUpdate
public java.lang.Long getLastUpdate()
Get the time (ms since epoch) that the repository usage was last updated.- Returns:
- time of last usage update
-
getUsers
public java.lang.Long getUsers()
Get the number of users or null if unknown- Returns:
- the number of users or null if unknown
-
getDocuments
public java.lang.Long getDocuments()
Get the number of documents or null if not known- Returns:
- document count or null if not known
-
getLicenseMode
public RepoUsage.LicenseMode getLicenseMode()
Get the server license mode. This is determined by (a) the build in use and (b) the installed license.- Returns:
- the license mode (never null)
-
getLicenseExpiryDate
public java.lang.Long getLicenseExpiryDate()
Get the server license expiry date. This is determined by the license and is null if there is no expiry or if it is unknown.- Returns:
- the license expiry date or null
-
isReadOnly
public boolean isReadOnly()
Get the read-write state of the repository- Returns:
- true if the server is in read-only mode otherwise false
-
-