org.jboss.cache.jmx
Interface CacheJmxWrapperMBean<K,V>

All Superinterfaces:
LegacyConfiguration
All Known Implementing Classes:
CacheJmxWrapper

public interface CacheJmxWrapperMBean<K,V>
extends LegacyConfiguration

JMX interface to the Cache. Full access to the cache is not supported, only a certain set of operations are exposed via JMX:

  1. Lifecycle methods - create, start, stop, destroy
  2. Configuration (read-only) getter - which retrieves a String (or formatted HTML for web based JMX consoles) representation of the configuration
  3. Properties exposing Configuration elements
  4. Cache information methods (numNodes, numAttributes, lockInfo, printDetails) which print as Strings or as formatted HTML (for web based JMX consoles)
  5. Since:
    2.0.0

    Field Summary
    static int CREATED
              The lifecycle method create has completed
    static int DESTROYED
              The lifecycle method destroy has completed
    static int FAILED
              There has been an error during some operation
    static int REGISTERED
              The MBean has been instantiated and has completed MBeanRegistration.postRegister
    static int STARTED
              The lifecycle method start has completed
    static int STARTING
              The lifecycle method start has been invoked
    static int STOPPED
              The lifecycle method stop has completed
    static int STOPPING
              The lifecycle method stop has been invoked
    static int UNREGISTERED
              The MBean has been instantiated but has not completed MBeanRegistration.postRegister
     
    Method Summary
     void create()
               
     void destroy()
               
     Cache<K,V> getCache()
              Retrieves a reference to the underlying Cache
     java.lang.String getCacheDetails()
               
     java.lang.String getCacheDetailsAsHtml()
               
     CacheStatus getCacheStatus()
              Gets where this object is in its lifecycle transitions.
     Configuration getConfiguration()
               
     java.lang.String getConfigurationAsHtmlString()
               
     java.lang.String getConfigurationAsString()
               
     org.jgroups.Address getLocalAddress()
              Returns the local address of this cache in a cluster, or null if running in local mode.
     java.lang.String getLockInfo()
               
     java.lang.String getLockInfoAsHtml()
               
     java.util.List<org.jgroups.Address> getMembers()
              Returns a list of members in the cluster, or null if running in local mode.
     int getNumberOfAttributes()
               
     int getNumberOfNodes()
               
     boolean getRegisterInterceptors()
              Gets whether this object should register the cache's interceptors with JMX during {@link #create()}.
     int getState()
              Legacy attribute to expose the cache status in terms of the JBoss AS ServiceMBean values.
     void setRegisterInterceptors(boolean register)
              Sets whether this object should register the cache's interceptors with JMX during create().
     void start()
               
     void stop()
               
     
    Methods inherited from interface org.jboss.cache.jmx.LegacyConfiguration
    getBuddyReplicationConfig, getCacheLoaderConfig, getCacheLoaderConfiguration, getCacheMode, getClusterConfig, getClusterName, getClusterProperties, getEvictionPolicyConfig, getExposeManagementStatistics, getFetchInMemoryState, getInitialStateRetrievalTimeout, getIsolationLevel, getLockAcquisitionTimeout, getMultiplexerService, getMultiplexerStack, getMuxChannelFactory, getNodeLockingScheme, getReplicationVersion, getReplQueueInterval, getReplQueueMaxElements, getStateRetrievalTimeout, getSyncCommitPhase, getSyncReplTimeout, getSyncRollbackPhase, getTransactionManager, getTransactionManagerLookupClass, getUseInterceptorMbeans, getUseRegionBasedMarshalling, getUseReplQueue, isInactiveOnStartup, setBuddyReplicationConfig, setCacheLoaderConfig, setCacheLoaderConfiguration, setCacheMode, setClusterConfig, setClusterName, setClusterProperties, setEvictionPolicyConfig, setExposeManagementStatistics, setFetchInMemoryState, setInactiveOnStartup, setInitialStateRetrievalTimeout, setIsolationLevel, setLockAcquisitionTimeout, setMultiplexerService, setMultiplexerStack, setMuxChannelFactory, setNodeLockingScheme, setReplicationVersion, setReplQueueInterval, setReplQueueMaxElements, setStateRetrievalTimeout, setSyncCommitPhase, setSyncReplTimeout, setSyncRollbackPhase, setTransactionManager, setTransactionManagerLookupClass, setUseInterceptorMbeans, setUseRegionBasedMarshalling, setUseReplQueue
     

    Field Detail

    STOPPED

    static final int STOPPED
    The lifecycle method stop has completed

    See Also:
    Constant Field Values

    STOPPING

    static final int STOPPING
    The lifecycle method stop has been invoked

    See Also:
    Constant Field Values

    STARTING

    static final int STARTING
    The lifecycle method start has been invoked

    See Also:
    Constant Field Values

    STARTED

    static final int STARTED
    The lifecycle method start has completed

    See Also:
    Constant Field Values

    FAILED

    static final int FAILED
    There has been an error during some operation

    See Also:
    Constant Field Values

    DESTROYED

    static final int DESTROYED
    The lifecycle method destroy has completed

    See Also:
    Constant Field Values

    CREATED

    static final int CREATED
    The lifecycle method create has completed

    See Also:
    Constant Field Values

    UNREGISTERED

    static final int UNREGISTERED
    The MBean has been instantiated but has not completed MBeanRegistration.postRegister

    See Also:
    Constant Field Values

    REGISTERED

    static final int REGISTERED
    The MBean has been instantiated and has completed MBeanRegistration.postRegister

    See Also:
    Constant Field Values
    Method Detail

    create

    void create()
                throws CacheException
    Throws:
    CacheException

    start

    void start()
               throws CacheException
    Throws:
    CacheException

    stop

    void stop()

    destroy

    void destroy()

    getCacheStatus

    CacheStatus getCacheStatus()
    Gets where this object is in its lifecycle transitions.

    Returns:
    the current status. Will not return null

    getState

    int getState()
    Legacy attribute to expose the cache status in terms of the JBoss AS ServiceMBean values. This interface does not extend ServiceMBean, but this attribute is retained to provide compatibility with the JBoss AS JSR-77 integration layer.

    Returns:
    the current status, e.g. STARTED.

    getCache

    Cache<K,V> getCache()
    Retrieves a reference to the underlying Cache


    getConfiguration

    Configuration getConfiguration()
    Returns:
    an immutable configuration

    getConfigurationAsString

    java.lang.String getConfigurationAsString()
    Returns:
    a string based representation of the configuration

    getConfigurationAsHtmlString

    java.lang.String getConfigurationAsHtmlString()
    Returns:
    an HTML formatted string based representation of the configuration

    getCacheDetails

    java.lang.String getCacheDetails()
    Returns:
    details of nodes in the cache

    getCacheDetailsAsHtml

    java.lang.String getCacheDetailsAsHtml()
    Returns:
    details of nodes in the cache, formatted as HTML

    getLocalAddress

    org.jgroups.Address getLocalAddress()
    Returns the local address of this cache in a cluster, or null if running in local mode.

    Returns:
    the local address of this cache in a cluster, or null if running in local mode.

    getMembers

    java.util.List<org.jgroups.Address> getMembers()
    Returns a list of members in the cluster, or null if running in local mode.

    Returns:
    a List of members in the cluster, or null if running in local mode.

    getNumberOfNodes

    int getNumberOfNodes()
    Returns:
    number of nodes in the cache

    getNumberOfAttributes

    int getNumberOfAttributes()
    Returns:
    number of attributes in the cache

    getLockInfo

    java.lang.String getLockInfo()
    Returns:
    information on the state of node locks

    getLockInfoAsHtml

    java.lang.String getLockInfoAsHtml()
    Returns:
    information on the state of node locks, formatted as HTML

    getRegisterInterceptors

    boolean getRegisterInterceptors()
    Gets whether this object should register the cache's interceptors with JMX during {@link #create()}.

    Default is true.


    setRegisterInterceptors

    void setRegisterInterceptors(boolean register)
    Sets whether this object should register the cache's interceptors with JMX during create().

    Default is true.