Interface AttributesStore
public interface AttributesStore
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGets a list of all users and their attributeslonggetCurrentDataUsageByUser(String username) Returns the user's current data usage from the persistent storelonggetDataLimitByUser(String username) Returns the user's current data limit from the persistent storevoidResets all known user's data usages to 0.voidsetDataLimit(String username, long dataLimit) Resets the user's data limit in the persistent store to the size specified in bytesvoidsetDataUsage(String username, long dataUsage) Resets the user's data usage in the persistent store to the usage specified in bytesvoidupdateUserDataUsage(String username, long dataUsage) Adds the specified data usage in bytes to the user's data usage in the persistent store
-
Field Details
-
DATA_USAGE_KEY
- See Also:
-
DATA_USAGE_LIMIT_KEY
- See Also:
-
USER_KEY
- See Also:
-
-
Method Details
-
getCurrentDataUsageByUser
Returns the user's current data usage from the persistent store- Parameters:
username-- Returns:
- data usage
- Throws:
PersistenceException
-
getDataLimitByUser
Returns the user's current data limit from the persistent store- Parameters:
username-- Returns:
- Throws:
PersistenceException
-
updateUserDataUsage
Adds the specified data usage in bytes to the user's data usage in the persistent store- Parameters:
username-dataUsage-- Throws:
PersistenceException
-
setDataUsage
Resets the user's data usage in the persistent store to the usage specified in bytes- Parameters:
username-dataUsage-- Throws:
PersistenceException
-
setDataLimit
Resets the user's data limit in the persistent store to the size specified in bytes- Parameters:
username-dataLimit-- Throws:
PersistenceException
-
getAllUsers
Gets a list of all users and their attributes- Returns:
- a list of users and their data usage properties
- Throws:
PersistenceException
-
resetUserDataUsages
Resets all known user's data usages to 0.- Throws:
PersistenceException
-