Berkeley DB Java Edition
version 5.0.34

com.sleepycat.je.jmx
Class JEMBeanHelper

java.lang.Object
  extended by com.sleepycat.je.jmx.JEMBeanHelper

Deprecated. As of JE 4, JEMBeanHelper is deprecated in favor of the concrete MBeans available by default with a JE environment. These MBeans can be registered and enabled by the environment by setting the following JVM property: JEMonitor: This MBean provides general stats monitoring and access to basic environment level operations. JEMBeanHelper is a utility class for the MBean implementation which wants to add management of a JE environment to its capabilities. MBean implementations can contain a JEMBeanHelper instance to get MBean metadata for JE and to set attributes, get attributes, and invoke operations.

com.sleepycat.je.jmx.JEMonitor and the example program jmx.JEApplicationMBean are two MBean implementations which provide support different application use cases. See those classes for examples of how to use JEMBeanHelper.

public class JEMBeanHelper
extends Object


Field Summary
static String ATT_CACHE_PERCENT
          Deprecated.  
static String ATT_CACHE_SIZE
          Deprecated.  
static String ATT_ENV_HOME
          Deprecated.  
static String ATT_IS_READ_ONLY
          Deprecated.  
static String ATT_IS_SERIALIZABLE
          Deprecated.  
static String ATT_IS_TRANSACTIONAL
          Deprecated.  
static String ATT_LOCK_TIMEOUT
          Deprecated.  
static String ATT_OPEN
          Deprecated.  
static String ATT_SET_READ_ONLY
          Deprecated.  
static String ATT_SET_SERIALIZABLE
          Deprecated.  
static String ATT_SET_TRANSACTIONAL
          Deprecated.  
static String ATT_TXN_TIMEOUT
          Deprecated.  
 
Constructor Summary
JEMBeanHelper(File environmentHome, boolean canConfigure)
          Deprecated. Instantiate a helper, specifying environment home and open capabilities.
 
Method Summary
 Object getAttribute(Environment targetEnv, String attributeName)
          Deprecated. Get an attribute value for the given environment.
 List<MBeanAttributeInfo> getAttributeList(Environment targetEnv)
          Deprecated. Get MBean attribute metadata for this environment.
 File getEnvironmentHome()
          Deprecated. Return the target environment directory.
 Environment getEnvironmentIfOpen()
          Deprecated. Return an Environment only if the environment has already been opened in this process.
 EnvironmentConfig getEnvironmentOpenConfig()
          Deprecated. If the helper was instantiated with canConfigure==true, it shows environment configuration attributes.
 boolean getNeedReset()
          Deprecated. Tell the MBean if the available set of functionality has changed.
 MBeanNotificationInfo[] getNotificationInfo(Environment targetEnv)
          Deprecated. No notifications are supported.
 List<MBeanOperationInfo> getOperationList(Environment targetEnv)
          Deprecated. Get mbean operation metadata for this environment.
 Object invoke(Environment targetEnv, String actionName, Object[] params, String[] signature)
          Deprecated. Invoke an operation for the given environment.
 void setAttribute(Environment targetEnv, Attribute attribute)
          Deprecated. Set an attribute value for the given environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATT_ENV_HOME

public static final String ATT_ENV_HOME
Deprecated. 
See Also:
Constant Field Values

ATT_OPEN

public static final String ATT_OPEN
Deprecated. 
See Also:
Constant Field Values

ATT_IS_READ_ONLY

public static final String ATT_IS_READ_ONLY
Deprecated. 
See Also:
Constant Field Values

ATT_IS_TRANSACTIONAL

public static final String ATT_IS_TRANSACTIONAL
Deprecated. 
See Also:
Constant Field Values

ATT_CACHE_SIZE

public static final String ATT_CACHE_SIZE
Deprecated. 
See Also:
Constant Field Values

ATT_CACHE_PERCENT

public static final String ATT_CACHE_PERCENT
Deprecated. 
See Also:
Constant Field Values

ATT_LOCK_TIMEOUT

public static final String ATT_LOCK_TIMEOUT
Deprecated. 
See Also:
Constant Field Values

ATT_IS_SERIALIZABLE

public static final String ATT_IS_SERIALIZABLE
Deprecated. 
See Also:
Constant Field Values

ATT_TXN_TIMEOUT

public static final String ATT_TXN_TIMEOUT
Deprecated. 
See Also:
Constant Field Values

ATT_SET_READ_ONLY

public static final String ATT_SET_READ_ONLY
Deprecated. 
See Also:
Constant Field Values

ATT_SET_TRANSACTIONAL

public static final String ATT_SET_TRANSACTIONAL
Deprecated. 
See Also:
Constant Field Values

ATT_SET_SERIALIZABLE

public static final String ATT_SET_SERIALIZABLE
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

JEMBeanHelper

public JEMBeanHelper(File environmentHome,
                     boolean canConfigure)
Deprecated. 
Instantiate a helper, specifying environment home and open capabilities.

Parameters:
environmentHome - home directory of the target JE environment.
canConfigure - If true, the helper will show environment configuration attributes.
Method Detail

getEnvironmentHome

public File getEnvironmentHome()
Deprecated. 
Return the target environment directory.

Returns:
the environment directory.

getEnvironmentOpenConfig

public EnvironmentConfig getEnvironmentOpenConfig()
Deprecated. 
If the helper was instantiated with canConfigure==true, it shows environment configuration attributes. Those attributes are returned within this EnvironmentConfig object for use in opening environments.

Returns:
EnvironmentConfig object which saves configuration attributes recorded through MBean attributes.

getEnvironmentIfOpen

public Environment getEnvironmentIfOpen()
Deprecated. 
Return an Environment only if the environment has already been opened in this process. A helper method for MBeans which want to only access open environments.

Returns:
Environment if already open, null if not open.

getNeedReset

public boolean getNeedReset()
Deprecated. 
Tell the MBean if the available set of functionality has changed.

Returns:
true if the MBean should regenerate its JE metadata.

getAttributeList

public List<MBeanAttributeInfo> getAttributeList(Environment targetEnv)
Deprecated. 
Get MBean attribute metadata for this environment.

Parameters:
targetEnv - The target JE environment. May be null if the environment is not open.
Returns:
list of MBeanAttributeInfo objects describing the available attributes.

getAttribute

public Object getAttribute(Environment targetEnv,
                           String attributeName)
                    throws AttributeNotFoundException,
                           MBeanException
Deprecated. 
Get an attribute value for the given environment. Check JEMBeanHelper.getNeedReset() after this call because the helper may detect that the environment has changed and that the MBean metadata should be reset.

Parameters:
targetEnv - The target JE environment. May be null if the environment is not open.
attributeName - attribute name.
Returns:
attribute value.
Throws:
AttributeNotFoundException
MBeanException

setAttribute

public void setAttribute(Environment targetEnv,
                         Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException
Deprecated. 
Set an attribute value for the given environment.

Parameters:
targetEnv - The target JE environment. May be null if the environment is not open.
attribute - name/value pair
Throws:
AttributeNotFoundException
InvalidAttributeValueException

getOperationList

public List<MBeanOperationInfo> getOperationList(Environment targetEnv)
Deprecated. 
Get mbean operation metadata for this environment.

Parameters:
targetEnv - The target JE environment. May be null if the environment is not open.
Returns:
List of MBeanOperationInfo describing available operations.

invoke

public Object invoke(Environment targetEnv,
                     String actionName,
                     Object[] params,
                     String[] signature)
              throws MBeanException
Deprecated. 
Invoke an operation for the given environment.

Parameters:
targetEnv - The target JE environment. May be null if the environment is not open.
actionName - operation name.
params - operation parameters. May be null.
signature - operation signature. May be null.
Returns:
the operation result
Throws:
MBeanException

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo(Environment targetEnv)
Deprecated. 
No notifications are supported.

Returns:
List of MBeanNotificationInfo for available notifications.

Berkeley DB Java Edition
version 5.0.34

Copyright (c) 2004-2011 Oracle. All rights reserved.