Package org.alfresco.filesys.repo
Class UserQuotaDetails
- java.lang.Object
-
- org.alfresco.filesys.repo.UserQuotaDetails
-
public class UserQuotaDetails extends java.lang.ObjectUser Quota Details ClassUsed to track the live usage of a user as files are being written.
- Author:
- gkspencer
-
-
Constructor Summary
Constructors Constructor Description UserQuotaDetails(java.lang.String userName, long quota)Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaddToCurrentUsage(long usage)Add to the current live usagelonggetAvailableSpace()Return the available space for this user, -1 is unlimitedlonggetCurrentUsage()Return the current live usage, in byteslonggetLastUpdated()Return the time the live usage value was last updatedjava.lang.StringgetUserName()Return the user namelonggetUserQuota()Return the user quota, in bytesbooleanhasUserQuota()Check if the user has a usage quotavoidsetCurrentUsage(long usage)Update the current live usagevoidsetUserQuota(long quota)Set the user quota, in byteslongsubtractFromCurrentUsage(long usage)Subtract from the current live usagejava.lang.StringtoString()Return the user quota details as a string
-
-
-
Method Detail
-
getUserName
public final java.lang.String getUserName()
Return the user name- Returns:
- String
-
hasUserQuota
public final boolean hasUserQuota()
Check if the user has a usage quota- Returns:
- boolean
-
getUserQuota
public final long getUserQuota()
Return the user quota, in bytes- Returns:
- long
-
getCurrentUsage
public final long getCurrentUsage()
Return the current live usage, in bytes- Returns:
- long
-
getLastUpdated
public final long getLastUpdated()
Return the time the live usage value was last updated- Returns:
- long
-
getAvailableSpace
public final long getAvailableSpace()
Return the available space for this user, -1 is unlimited- Returns:
- long
-
setUserQuota
public final void setUserQuota(long quota)
Set the user quota, in bytes- Parameters:
quota- long
-
setCurrentUsage
public final void setCurrentUsage(long usage)
Update the current live usage- Parameters:
usage- long
-
addToCurrentUsage
public final long addToCurrentUsage(long usage)
Add to the current live usage- Parameters:
usage- long- Returns:
- long
-
subtractFromCurrentUsage
public final long subtractFromCurrentUsage(long usage)
Subtract from the current live usage- Parameters:
usage- long- Returns:
- long
-
toString
public java.lang.String toString()
Return the user quota details as a string- Overrides:
toStringin classjava.lang.Object- Returns:
- String
-
-