public class UserQuotaDetails
extends java.lang.Object
Used to track the live usage of a user as files are being written.
| Constructor and Description |
|---|
UserQuotaDetails(java.lang.String userName,
long quota)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
long |
addToCurrentUsage(long usage)
Add to the current live usage
|
long |
getAvailableSpace()
Return the available space for this user, -1 is unlimited
|
long |
getCurrentUsage()
Return the current live usage, in bytes
|
long |
getLastUpdated()
Return the time the live usage value was last updated
|
java.lang.String |
getUserName()
Return the user name
|
long |
getUserQuota()
Return the user quota, in bytes
|
boolean |
hasUserQuota()
Check if the user has a usage quota
|
void |
setCurrentUsage(long usage)
Update the current live usage
|
void |
setUserQuota(long quota)
Set the user quota, in bytes
|
long |
subtractFromCurrentUsage(long usage)
Subtract from the current live usage
|
java.lang.String |
toString()
Return the user quota details as a string
|
public UserQuotaDetails(java.lang.String userName,
long quota)
userName - Stringquota - longpublic final java.lang.String getUserName()
public final boolean hasUserQuota()
public final long getUserQuota()
public final long getCurrentUsage()
public final long getLastUpdated()
public final long getAvailableSpace()
public final void setUserQuota(long quota)
quota - longpublic final void setCurrentUsage(long usage)
usage - longpublic final long addToCurrentUsage(long usage)
usage - longpublic final long subtractFromCurrentUsage(long usage)
usage - longpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.