Class MainCacheMBeanImpl
- java.lang.Object
-
- de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
-
- de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
-
- de.hybris.platform.jmx.mbeans.impl.MainCacheMBeanImpl
-
- All Implemented Interfaces:
MainCacheMBean,org.springframework.beans.factory.InitializingBean
@ManagedResource(description="Overview of the main cache of the hybris platform.") public class MainCacheMBeanImpl extends AbstractJMXMBean implements MainCacheMBean
hybris MBean. Shows statistics for the hybris platform main cache.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
AbstractJMXMBean.TenantAwareExecutor<T>
-
-
Constructor Summary
Constructors Constructor Description MainCacheMBeanImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCache()clears the cache and the statistics.java.lang.IntegergetCurrentCacheSize()java.lang.IntegergetCurrentCacheSizeInPercent()java.lang.LonggetEntitiesAddCount()java.lang.LonggetEntitiesGetCount()java.lang.LonggetEntitiesMissCount()java.lang.LonggetEntitiesMissCountInPercent()java.lang.LonggetEntitiesRemoveCount()java.lang.IntegergetMaximumCacheSize()java.lang.IntegergetMaxReachedCacheSize()java.lang.IntegergetMaxReachedCacheSizeInPercent()java.util.Collection<java.lang.String>showCacheStatistics(int lowerBound, int upperBound)Returns a collection with the cache statistics.java.lang.StringstartCacheStatistics()Starts the collecting of the cache statistics.java.lang.StringstopCacheStatistics()Stops the collection of the cache statistics.-
Methods inherited from class de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
activateTenant, afterPropertiesSet, deactivateTenant, getBeanInterface, getObjectName, isJNDIContextAware, setBeanInterface, setJmxPath
-
Methods inherited from class de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
getJmxDomain, getJmxPath, getObjectNameString, getTenantId, setTenant
-
-
-
-
Method Detail
-
getMaximumCacheSize
@ManagedAttribute(description="The maximum number of cache entries. When it is exceeded, the cache mechanism removes the least recently used entries before adding new ones.") public java.lang.Integer getMaximumCacheSize()
- Specified by:
getMaximumCacheSizein interfaceMainCacheMBean- Returns:
- the maximum cache size.
-
getCurrentCacheSize
@ManagedAttribute(description="Current amount of entries in internal cache.") public java.lang.Integer getCurrentCacheSize()
- Specified by:
getCurrentCacheSizein interfaceMainCacheMBean- Returns:
- the current cache size.
-
getCurrentCacheSizeInPercent
@ManagedAttribute(description="Current size of the internal cache in percent, related to maximumCacheSize.") public java.lang.Integer getCurrentCacheSizeInPercent()
- Specified by:
getCurrentCacheSizeInPercentin interfaceMainCacheMBean- Returns:
- the current cache size as percent value (0 - 100). Related to maximum cahce size.
-
getMaxReachedCacheSize
@ManagedAttribute(description="The maximum number of cache entries reached since the cache creation and reseted when clearCache is called.") public java.lang.Integer getMaxReachedCacheSize()
- Specified by:
getMaxReachedCacheSizein interfaceMainCacheMBean- Returns:
- the maximum reached entities number of the cache. Related to
MainCacheMBean.getCurrentCacheSize()
-
getMaxReachedCacheSizeInPercent
@ManagedAttribute(description="The maximum number of cache entries in percent (related to maximumCacheSize), reached since the cache creation or a last clear.") public java.lang.Integer getMaxReachedCacheSizeInPercent()
- Specified by:
getMaxReachedCacheSizeInPercentin interfaceMainCacheMBean- Returns:
- the maximum reached entities number in percent (0 - 100) (related to maximumCacheSize)
-
getEntitiesGetCount
@ManagedAttribute(description="The number of entities requested from the cache since its creation or a last clear.") public java.lang.Long getEntitiesGetCount()
- Specified by:
getEntitiesGetCountin interfaceMainCacheMBean- Returns:
- how many entities where requested from the cache since last clear
-
getEntitiesAddCount
@ManagedAttribute(description="The number of entities added to the cache since creation or last clear.") public java.lang.Long getEntitiesAddCount()
- Specified by:
getEntitiesAddCountin interfaceMainCacheMBean- Returns:
- how many entities where added to the cache since creation or last clear
-
getEntitiesRemoveCount
@ManagedAttribute(description="The number of entities removed from the cache since its creation or the last clear.") public java.lang.Long getEntitiesRemoveCount()
- Specified by:
getEntitiesRemoveCountin interfaceMainCacheMBean- Returns:
- how many entities where removed from the cache since last clear
-
getEntitiesMissCount
@ManagedAttribute(description="The number of entities not existing in cache that were requested since a last clear.") public java.lang.Long getEntitiesMissCount()
- Specified by:
getEntitiesMissCountin interfaceMainCacheMBean- Returns:
- how many entities where requested but wasn't in the cache since creation or last clear
-
getEntitiesMissCountInPercent
@ManagedAttribute(description="The number of entities which were requested but wasn\'t in the cache in percent.") public java.lang.Long getEntitiesMissCountInPercent()
- Specified by:
getEntitiesMissCountInPercentin interfaceMainCacheMBean- Returns:
- in percent how many entities were requested but wasn't in the cache since creation or last clear.
-
clearCache
@ManagedOperation(description="Clears the internal cache and the cache statistics.") public void clearCache()
Description copied from interface:MainCacheMBeanclears the cache and the statistics.- Specified by:
clearCachein interfaceMainCacheMBean
-
startCacheStatistics
@ManagedOperation(description="Starts collecting data for the cache statistics.") public java.lang.String startCacheStatistics()
Description copied from interface:MainCacheMBeanStarts the collecting of the cache statistics.- Specified by:
startCacheStatisticsin interfaceMainCacheMBean- Returns:
- a status information if this was successful or not.
-
stopCacheStatistics
@ManagedOperation(description="Stops collecting data for the cache statistics.") public java.lang.String stopCacheStatistics()
Description copied from interface:MainCacheMBeanStops the collection of the cache statistics.- Specified by:
stopCacheStatisticsin interfaceMainCacheMBean- Returns:
- a status information if this was successful or not.
-
showCacheStatistics
@ManagedOperation(description="Shows the cache statistics.") @ManagedOperationParameter(name="lowerBound",description="lower key ratio in percent") @ManagedOperationParameter(name="upperBound",description="upper key ratio in percent") public java.util.Collection<java.lang.String> showCacheStatistics(int lowerBound, int upperBound)Description copied from interface:MainCacheMBeanReturns a collection with the cache statistics.- Specified by:
showCacheStatisticsin interfaceMainCacheMBean- Parameters:
lowerBound- the lower bound the the returned collection. Each entry factor is greater or equal.upperBound- the upper bound for the returned collection. Each entry factor is equal or less.- Returns:
- a collection with the informations
-
-