org.broadleafcommerce.common.cache
Class StatisticsServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.common.cache.StatisticsServiceImpl
All Implemented Interfaces:
DynamicMBean, StatisticsService, org.springframework.jmx.export.naming.SelfNaming

@Service(value="blStatisticsService")
public class StatisticsServiceImpl
extends Object
implements DynamicMBean, StatisticsService, org.springframework.jmx.export.naming.SelfNaming

Author:
Jeff Fischer

Field Summary
protected  String appName
           
protected  Map<String,CacheStat> cacheStats
           
protected  Long logResolution
           
 
Constructor Summary
StatisticsServiceImpl()
           
 
Method Summary
 void activateLogging()
           
 void addCacheStat(String key, boolean isHit)
           
 void disableLogging()
           
 String getAppName()
           
 Object getAttribute(String attribute)
           
 AttributeList getAttributes(String[] attributes)
           
protected  CacheStat getCacheStat(String key)
           
 Long getLogResolution()
           
 MBeanInfo getMBeanInfo()
           
 ObjectName getObjectName()
           
 Object invoke(String actionName, Object[] params, String[] signature)
           
 void setAppName(String appName)
           
 void setAttribute(Attribute attribute)
           
 AttributeList setAttributes(AttributeList attributes)
           
 void setLogResolution(Long logResolution)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logResolution

@Value(value="${cache.stat.log.resolution}")
protected Long logResolution

appName

protected String appName

cacheStats

protected Map<String,CacheStat> cacheStats
Constructor Detail

StatisticsServiceImpl

public StatisticsServiceImpl()
Method Detail

addCacheStat

public void addCacheStat(String key,
                         boolean isHit)
Specified by:
addCacheStat in interface StatisticsService

getCacheStat

protected CacheStat getCacheStat(String key)

getLogResolution

public Long getLogResolution()
Specified by:
getLogResolution in interface StatisticsService

setLogResolution

public void setLogResolution(Long logResolution)
Specified by:
setLogResolution in interface StatisticsService

activateLogging

public void activateLogging()
Specified by:
activateLogging in interface StatisticsService

disableLogging

public void disableLogging()
Specified by:
disableLogging in interface StatisticsService

getAppName

public String getAppName()

setAppName

public void setAppName(String appName)

getAttribute

public Object getAttribute(String attribute)
                    throws AttributeNotFoundException,
                           MBeanException,
                           ReflectionException
Specified by:
getAttribute in interface DynamicMBean
Throws:
AttributeNotFoundException
MBeanException
ReflectionException

setAttribute

public void setAttribute(Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Specified by:
setAttribute in interface DynamicMBean
Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException

getAttributes

public AttributeList getAttributes(String[] attributes)
Specified by:
getAttributes in interface DynamicMBean

setAttributes

public AttributeList setAttributes(AttributeList attributes)
Specified by:
setAttributes in interface DynamicMBean

invoke

public Object invoke(String actionName,
                     Object[] params,
                     String[] signature)
              throws MBeanException,
                     ReflectionException
Specified by:
invoke in interface DynamicMBean
Throws:
MBeanException
ReflectionException

getObjectName

public ObjectName getObjectName()
                         throws MalformedObjectNameException
Specified by:
getObjectName in interface org.springframework.jmx.export.naming.SelfNaming
Throws:
MalformedObjectNameException

getMBeanInfo

public MBeanInfo getMBeanInfo()
Specified by:
getMBeanInfo in interface DynamicMBean


Copyright © 2013. All Rights Reserved.