Top Description Fields Constructors Methods
net.sf.ehcache.management

public final Class Store

extends Object
implements Serializable, DynamicMBean
Class Inheritance
All Implemented Interfaces
javax.management.DynamicMBean, java.io.Serializable
Imports
java.io.Serializable, javax.management.Attribute, .AttributeList, .AttributeNotFoundException, .DynamicMBean, .InvalidAttributeValueException, .MBeanException, .MBeanInfo, .MalformedObjectNameException, .NotCompliantMBeanException, .ObjectName, .ReflectionException, .StandardMBean, net.sf.ehcache.CacheException, .Ehcache, net.sf.ehcache.hibernate.management.impl.EhcacheHibernateMbeanNames

Wrapper class for store specific dynamic mbeans.
Author
Chris Dennis

Field Summary

Modifier and TypeField and Description
private final ObjectName
private static final long
private final DynamicMBean

Constructor Summary

AccessConstructor and Description
private
Store(Ehcache ehcache, Object storeBean)

Method Summary

Modifier and TypeMethod and Description
pack-priv static ObjectName
createObjectName(String cacheManagerName, String cacheName)

Creates an object name using the scheme "net.sf.ehcache:type=Store,CacheManager=<cachemanagername>,name=<cachename>"

public Object
getAttribute(String
The name of the attribute to be retrieved
attribute
)

Implements javax.management.DynamicMBean.getAttribute.

Obtain the value of a specific attribute of the Dynamic MBean.
public AttributeList
getAttributes(String[]
A list of the attributes to be retrieved.
attributes
)

Implements javax.management.DynamicMBean.getAttributes.

Get the values of several attributes of the Dynamic MBean.
pack-priv static Store
getBean(Ehcache cache)

Get the optional store management bean for the given cache.

public MBeanInfo
getMBeanInfo()

Implements javax.management.DynamicMBean.getMBeanInfo.

Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.
public ObjectName

Returns:

the object name for this MBean
getObjectName
()

public Object
invoke(String
The name of the action to be invoked.
actionName
,
Object[]
An array containing the parameters to be set when the action is invoked.
params
,
String[]
An array containing the signature of the action. The class objects will be loaded through the same class loader as the one used for loading the MBean on which the action is invoked.
signature
)

Implements javax.management.DynamicMBean.invoke.

Allows an action to be invoked on the Dynamic MBean.
public void
setAttribute(Attribute
The identification of the attribute to be set and the value it is to be set to.
attribute
)

Implements javax.management.DynamicMBean.setAttribute.

Set the value of a specific attribute of the Dynamic MBean.
public AttributeList
setAttributes(AttributeList
A list of attributes: The identification of the attributes to be set and the values they are to be set to.
attributes
)

Implements javax.management.DynamicMBean.setAttributes.

Sets the values of several attributes of the Dynamic MBean.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

objectNameback to summary
private final ObjectName objectName
serialVersionUIDback to summary
private static final long serialVersionUID
storeBeanback to summary
private final DynamicMBean storeBean

Constructor Detail

Storeback to summary
private Store(Ehcache ehcache, Object storeBean) throws NotCompliantMBeanException

Method Detail

createObjectNameback to summary
pack-priv static ObjectName createObjectName(String cacheManagerName, String cacheName)

Creates an object name using the scheme "net.sf.ehcache:type=Store,CacheManager=,name="

getAttributeback to summary
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException

Implements javax.management.DynamicMBean.getAttribute.

Doc from javax.management.DynamicMBean.getAttribute.

Obtain the value of a specific attribute of the Dynamic MBean.

Parameters
attribute:String

The name of the attribute to be retrieved

Returns:Object

The value of the attribute retrieved.

Exceptions
AttributeNotFoundException:
if specified attribute does not exist or cannot be retrieved
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's getter.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the getter.
getAttributesback to summary
public AttributeList getAttributes(String[] attributes)

Implements javax.management.DynamicMBean.getAttributes.

Doc from javax.management.DynamicMBean.getAttributes.

Get the values of several attributes of the Dynamic MBean.

Parameters
attributes:String[]

A list of the attributes to be retrieved.

Returns:AttributeList

The list of attributes retrieved.

getBeanback to summary
pack-priv static Store getBean(Ehcache cache) throws NotCompliantMBeanException

Get the optional store management bean for the given cache.

getMBeanInfoback to summary
public MBeanInfo getMBeanInfo()

Implements javax.management.DynamicMBean.getMBeanInfo.

Doc from javax.management.DynamicMBean.getMBeanInfo.

Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.

Returns:MBeanInfo

An instance of MBeanInfo allowing all attributes and actions exposed by this Dynamic MBean to be retrieved.

getObjectNameback to summary
public ObjectName getObjectName()
Returns:ObjectName

the object name for this MBean

invokeback to summary
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException

Implements javax.management.DynamicMBean.invoke.

Doc from javax.management.DynamicMBean.invoke.

Allows an action to be invoked on the Dynamic MBean.

Parameters
actionName:String

The name of the action to be invoked.

params:Object[]

An array containing the parameters to be set when the action is invoked.

signature:String[]

An array containing the signature of the action. The class objects will be loaded through the same class loader as the one used for loading the MBean on which the action is invoked.

Returns:Object

The object returned by the action, which represents the result of invoking the action on the MBean specified.

Exceptions
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's invoked method.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the method
setAttributeback to summary
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException

Implements javax.management.DynamicMBean.setAttribute.

Doc from javax.management.DynamicMBean.setAttribute.

Set the value of a specific attribute of the Dynamic MBean.

Parameters
attribute:Attribute

The identification of the attribute to be set and the value it is to be set to.

Exceptions
AttributeNotFoundException:
if specified attribute does not exist or cannot be retrieved
InvalidAttributeValueException:
if value specified is not valid for the attribute
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's setter.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the MBean's setter.
setAttributesback to summary
public AttributeList setAttributes(AttributeList attributes)

Implements javax.management.DynamicMBean.setAttributes.

Doc from javax.management.DynamicMBean.setAttributes.

Sets the values of several attributes of the Dynamic MBean.

Parameters
attributes:AttributeList

A list of attributes: The identification of the attributes to be set and the values they are to be set to.

Returns:AttributeList

The list of attributes that were set, with their new values.