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
- PersistenceException
long getDataLimitByUser(String username) throws PersistenceException
username
- PersistenceException
void updateUserDataUsage(String username, long dataUsage) throws PersistenceException
username
- dataUsage
- PersistenceException
void setDataUsage(String username, long dataUsage) throws PersistenceException
username
- dataUsage
- PersistenceException
void setDataLimit(String username, long dataLimit) throws PersistenceException
username
- dataLimit
- PersistenceException
List<Map<String,Object>> getAllUsers() throws PersistenceException
PersistenceException
void resetUserDataUsages() throws PersistenceException
PersistenceException
This work is licensed under a Creative Commons Attribution 4.0 International License.