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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclears the cache and the statistics.showCacheStatistics(int lowerBound, int upperBound) Returns a collection with the cache statistics.Starts the collecting of the cache statistics.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, setJmxPathMethods inherited from class de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
getJmxDomain, getJmxPath, getObjectNameString, getTenantId, setTenant
-
Constructor Details
-
MainCacheMBeanImpl
public MainCacheMBeanImpl()
-
-
Method Details
-
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 Integer getMaximumCacheSize()- Specified by:
getMaximumCacheSizein interfaceMainCacheMBean- Returns:
- the maximum cache size.
-
getCurrentCacheSize
@ManagedAttribute(description="Current amount of entries in internal cache.") public 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 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 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 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 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 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 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 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 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 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 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 Collection<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
-