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 String
ROLE
the 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 String
getMBeanDescription()
Get the description of the MBeanprotected String
getMBeanName()
Get the human readable name of the MBean.long
getTotalCacheSize()
Get the total size of all Ametys cachevoid
service(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:
service
in 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:AbstractAmetysDynamicMBean
Get 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:
_getAttribute
in classAbstractAmetysDynamicMBean
- Parameters:
attributeName
- the name of the attribute- Returns:
- the value of the attribute
-
getMBeanName
protected String getMBeanName()
Description copied from class:AbstractAmetysDynamicMBean
Get the human readable name of the MBean. This name will be exposed.- Specified by:
getMBeanName
in classAbstractAmetysDynamicMBean
- Returns:
- the name
-
getMBeanDescription
protected String getMBeanDescription()
Description copied from class:AbstractAmetysDynamicMBean
Get the description of the MBean- Specified by:
getMBeanDescription
in classAbstractAmetysDynamicMBean
- Returns:
- the description
-
getMBeanAttributes
protected MBeanAttributeInfo[] getMBeanAttributes()
Description copied from class:AbstractAmetysDynamicMBean
Get the definition of the attributes exposed by the MBean.- Specified by:
getMBeanAttributes
in classAbstractAmetysDynamicMBean
- Returns:
- the attributes information
-
-