public interface AttributesStore
| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_USAGE_KEY |
static String |
DATA_USAGE_LIMIT_KEY |
static String |
USER_KEY |
| Modifier and Type | Method and Description |
|---|---|
List<Map<String,Object>> |
getAllUsers()
Gets a list of all users and their attributes
|
long |
getCurrentDataUsageByUser(String username)
Returns the user's current data usage from the persistent store
|
long |
getDataLimitByUser(String username)
Returns the user's current data limit from the persistent store
|
void |
resetUserDataUsages()
Resets all known user's data usages to 0.
|
void |
setDataLimit(String username,
long dataLimit)
Resets the user's data limit in the persistent store to the size specified in bytes
|
void |
setDataUsage(String username,
long dataUsage)
Resets the user's data usage in the persistent store to the usage specified in bytes
|
void |
updateUserDataUsage(String username,
long dataUsage)
Adds the specified data usage in bytes to the user's data usage in the persistent store
|
static final String DATA_USAGE_KEY
static final String DATA_USAGE_LIMIT_KEY
static final String USER_KEY
long getCurrentDataUsageByUser(String username) throws PersistenceException
username - PersistenceExceptionlong getDataLimitByUser(String username) throws PersistenceException
username - PersistenceExceptionvoid updateUserDataUsage(String username, long dataUsage) throws PersistenceException
username - dataUsage - PersistenceExceptionvoid setDataUsage(String username, long dataUsage) throws PersistenceException
username - dataUsage - PersistenceExceptionvoid setDataLimit(String username, long dataLimit) throws PersistenceException
username - dataLimit - PersistenceExceptionList<Map<String,Object>> getAllUsers() throws PersistenceException
PersistenceExceptionvoid resetUserDataUsages()
throws PersistenceException
PersistenceExceptionThis work is licensed under a Creative Commons Attribution 4.0 International License.