Package org.ametys.core.mbean
Class CacheUsageMBean
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.mbean.AbstractAmetysDynamicMBean
-
- org.ametys.core.mbean.CacheUsageMBean
-
- All Implemented Interfaces:
DynamicMBean,LogEnabled,Serviceable
public class CacheUsageMBean extends AbstractAmetysDynamicMBean implements Serviceable
MBean providing information about Ametys cache usage
-
-
Field Summary
Fields Modifier and Type Field Description static StringROLEthe ROLE of the component-
Fields inherited from class org.ametys.core.mbean.AbstractAmetysDynamicMBean
_mBeanInfo
-
-
Constructor Summary
Constructors Constructor Description CacheUsageMBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object_getAttribute(String attributeName)Get the value of the attribute.protected MBeanAttributeInfo[]getMBeanAttributes()Get the definition of the attributes exposed by the MBean.protected StringgetMBeanDescription()Get the description of the MBeanprotected StringgetMBeanName()Get the human readable name of the MBean.longgetTotalCacheSize()Get the total size of all Ametys cachevoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.core.mbean.AbstractAmetysDynamicMBean
_fileSize, getAttribute, getAttributes, getMBeanConstructorInfo, getMBeanInfo, getMBeanNotificationInfo, getMBeanOperationInfo, invoke, setAttribute, setAttributes
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
CacheUsageMBean
public CacheUsageMBean()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getTotalCacheSize
public long getTotalCacheSize()
Get the total size of all Ametys cache- Returns:
- the cache size
-
_getAttribute
protected Object _getAttribute(String attributeName)
Description copied from class:AbstractAmetysDynamicMBeanGet the value of the attribute. This method should assume that attributeName is not null. And return null if the name is not recognized- Specified by:
_getAttributein classAbstractAmetysDynamicMBean- Parameters:
attributeName- the name of the attribute- Returns:
- the value of the attribute
-
getMBeanName
protected String getMBeanName()
Description copied from class:AbstractAmetysDynamicMBeanGet the human readable name of the MBean. This name will be exposed.- Specified by:
getMBeanNamein classAbstractAmetysDynamicMBean- Returns:
- the name
-
getMBeanDescription
protected String getMBeanDescription()
Description copied from class:AbstractAmetysDynamicMBeanGet the description of the MBean- Specified by:
getMBeanDescriptionin classAbstractAmetysDynamicMBean- Returns:
- the description
-
getMBeanAttributes
protected MBeanAttributeInfo[] getMBeanAttributes()
Description copied from class:AbstractAmetysDynamicMBeanGet the definition of the attributes exposed by the MBean.- Specified by:
getMBeanAttributesin classAbstractAmetysDynamicMBean- Returns:
- the attributes information
-
-