|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QuotaService<T extends QuotaKey>
Method Summary | |
---|---|
Quota |
get(T key)
Gets the quota of the resource from a given quota key. |
long |
getCurrentCount(T key)
Gets the current count from a given quota key |
Quota |
initialize(T key,
long maxCount)
Initializes the quota of the resource for the given quota key. |
Quota |
initialize(T key,
long minCount,
long maxCount)
Initializes the quota of the resource for the given quota key. |
Quota |
initialize(T key,
Quota quota)
Initializes the quota of the resource for the given quota key and from an existing quota. |
void |
remove(T key)
Removes quietly the quota of the resource from a given quota key. |
Quota |
verify(T key)
Verifies if the quota is full or not enough from a given quota key. |
Quota |
verify(T key,
AbstractQuotaCountingOffset countingOffset)
Verifies if the quota is full or not enough from a given quota key and adding a counting offset. |
Method Detail |
---|
long getCurrentCount(T key) throws QuotaException
key
-
QuotaException
Quota initialize(T key, long maxCount) throws QuotaException
key
- maxCount
-
QuotaException
Quota initialize(T key, long minCount, long maxCount) throws QuotaException
key
- minCount
- maxCount
-
QuotaException
Quota initialize(T key, Quota quota) throws QuotaException
key
- quota
-
QuotaException
Quota get(T key) throws QuotaException
key
-
QuotaException
Quota verify(T key) throws QuotaException
key
-
QuotaException
Quota verify(T key, AbstractQuotaCountingOffset countingOffset) throws QuotaException
key
- countingOffset
-
QuotaException
void remove(T key)
key
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |