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 IStatsUsageService
public Long getUsage(StatsUsageType statsUsageType)
getUsage
in interface IStatsUsageService
statsUsageType
- the usagetypeStatsUsageType
public void increaseUsage(StatsUsageType statsUsageType)
increaseUsage
in interface IStatsUsageService
statsUsageType
- the StatsUsageType
counter to increase Increase
the counter of the specified typepublic void resetUsage(StatsUsageType statsUsageType)
resetUsage
in interface IStatsUsageService
statsUsageType
- the StatsUsageType
to reset reset the stats for
the specified StatsUsageType
public void flush(StatsUsageType statsUsageType)
flush
in interface IStatsUsageService
statsUsageType
- the StatsUsageType
to flush flush the value into
databaseCopyright © 2015. All rights reserved.