|
Berkeley DB Java Edition version 3.0.12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sleepycat.je.jmx.JEMonitor
public class JEMonitor
JEMonitor is a JMX MBean which manages a JE environment. The MBean may be installed as is, or used as a starting point for building a MBean which includes JE support. JEMonitor expects another component in the JVM to configure and open the JE environment; it will only access a JE environment that is already active. It is intended for these use cases:
In this MBean, JE management is divided between the JEMonitor class and JEMBeanHelper class. JEMonitor contains an instance of JEMBeanHelper, which knows about JE attributes, operations and notifications. JEMonitor itself has the responsibility of obtaining a temporary handle for the JE environment.
The key implementation choice for a JE MBean is the approach taken for accessing the JE environment. Some of the salient considerations are:
Because of these considerations, JEMonitor avoids holding a JE environment handle in order to not impact the environment lifetime. Any environment handles used are held temporarily.
| Constructor Summary | |
|---|---|
JEMonitor(String environmentHome)
Instantiate a JEMonitor |
|
| Method Summary | |
|---|---|
protected void |
closeEnvironment(Environment targetEnv)
Be sure to close Environments when they are no longer used, because they pin down resources. |
Object |
getAttribute(String attributeName)
|
AttributeList |
getAttributes(String[] attributes)
|
protected Environment |
getEnvironmentIfOpen()
This MBean has the policy of only accessing an environment when it has already been configured and opened by other application threads. |
MBeanInfo |
getMBeanInfo()
|
Object |
invoke(String actionName,
Object[] params,
String[] signature)
|
void |
setAttribute(Attribute attribute)
|
AttributeList |
setAttributes(AttributeList attributes)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JEMonitor(String environmentHome)
throws MBeanException
environmentHome - home directory of the target JE environment.
MBeanException| Method Detail |
|---|
public Object getAttribute(String attributeName)
throws AttributeNotFoundException,
MBeanException
getAttribute in interface DynamicMBeanAttributeNotFoundException
MBeanExceptionDynamicMBean.getAttribute(java.lang.String)
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException
setAttribute in interface DynamicMBeanAttributeNotFoundException
InvalidAttributeValueException
MBeanExceptionDynamicMBean.setAttribute(javax.management.Attribute)public AttributeList getAttributes(String[] attributes)
getAttributes in interface DynamicMBeanDynamicMBean.getAttributes(java.lang.String[])public AttributeList setAttributes(AttributeList attributes)
setAttributes in interface DynamicMBeanDynamicMBean.setAttributes(javax.management.AttributeList)
public Object invoke(String actionName,
Object[] params,
String[] signature)
throws MBeanException
invoke in interface DynamicMBeanMBeanExceptionDynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])public MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeanDynamicMBean.getMBeanInfo()protected Environment getEnvironmentIfOpen()
protected void closeEnvironment(Environment targetEnv)
throws MBeanException
targetEnv - the open environment. May be null.
MBeanException
|
Berkeley DB Java Edition version 3.0.12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||