com.gisgraphy.service.impl
Class StatsUsageServiceImpl

java.lang.Object
  extended by com.gisgraphy.service.impl.StatsUsageServiceImpl
All Implemented Interfaces:
IStatsUsageService

public class StatsUsageServiceImpl
extends Object
implements IStatsUsageService


Field Summary
 
Fields inherited from interface com.gisgraphy.service.IStatsUsageService
FLUSH_THRESHOLD
 
Constructor Summary
StatsUsageServiceImpl()
           
 
Method Summary
 void flush(StatsUsageType statsUsageType)
           
 int getNumberOfCounter()
           
 Long getUsage(StatsUsageType statsUsageType)
           
 void increaseUsage(StatsUsageType statsUsageType)
           
protected  void init()
           
 void resetUsage(StatsUsageType statsUsageType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatsUsageServiceImpl

public StatsUsageServiceImpl()
Method Detail

init

@PostConstruct
protected void init()

getNumberOfCounter

public int getNumberOfCounter()
Specified by:
getNumberOfCounter in interface IStatsUsageService
Returns:
the number of counter that are managed

getUsage

public Long getUsage(StatsUsageType statsUsageType)
Specified by:
getUsage in interface IStatsUsageService
Parameters:
statsUsageType - the usagetype
Returns:
the Usage for the specified StatsUsageType

increaseUsage

public void increaseUsage(StatsUsageType statsUsageType)
Specified by:
increaseUsage in interface IStatsUsageService
Parameters:
statsUsageType - the StatsUsageType counter to increase Increase the counter of the specified type

resetUsage

public void resetUsage(StatsUsageType statsUsageType)
Specified by:
resetUsage in interface IStatsUsageService
Parameters:
statsUsageType - the StatsUsageType to reset reset the stats for the specified StatsUsageType

flush

public void flush(StatsUsageType statsUsageType)
Specified by:
flush in interface IStatsUsageService
Parameters:
statsUsageType - the StatsUsageType to flush flush the value into database


Copyright © 2012. All Rights Reserved.