public class StatsUsageServiceImpl extends Object implements IStatsUsageService
| Modifier and Type | Field and Description |
|---|---|
static boolean |
disabled |
FLUSH_THRESHOLD| Constructor and Description |
|---|
StatsUsageServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
flush(StatsUsageType statsUsageType) |
int |
getNumberOfCounter() |
Long |
getUsage(StatsUsageType statsUsageType) |
void |
increaseUsage(StatsUsageType statsUsageType) |
protected void |
init() |
void |
resetUsage(StatsUsageType statsUsageType) |
@PostConstruct protected void init()
public int getNumberOfCounter()
getNumberOfCounter in interface IStatsUsageServicepublic Long getUsage(StatsUsageType statsUsageType)
getUsage in interface IStatsUsageServicestatsUsageType - the usagetypeStatsUsageTypepublic void increaseUsage(StatsUsageType statsUsageType)
increaseUsage in interface IStatsUsageServicestatsUsageType - the StatsUsageType counter to increase Increase
the counter of the specified typepublic void resetUsage(StatsUsageType statsUsageType)
resetUsage in interface IStatsUsageServicestatsUsageType - the StatsUsageType to reset reset the stats for
the specified StatsUsageTypepublic void flush(StatsUsageType statsUsageType)
flush in interface IStatsUsageServicestatsUsageType - the StatsUsageType to flush flush the value into
databaseCopyright © 2015. All rights reserved.