KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > jmx > CacheJmxWrapperMBean


1 /*
2  * JBoss, Home of Professional Open Source
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.cache.jmx;
8
9 import org.jboss.cache.Cache;
10 import org.jboss.cache.config.Configuration;
11
12 /**
13  * JMX interface to the {@link org.jboss.cache.Cache}. Full access to the cache is not supported, only a certain
14  * set of operations are exposed via JMX:
15  * <p/>
16  * <ol>
17  * <li> Lifecycle methods - create, start, stop, destroy</li>
18  * <li> Configuration (read-only) getter - which retrieves a String (or formatted HTML for web based JMX consoles) representation of the configuration</li>
19  * <li> Setters for a specific subset of config elements which may be changed at runtime</li>
20  * <li> Cache information methods (numNodes, numAttributes, lockInfo, printDetails) which print as Strings or as formatted HTML (for web based JMX consoles)</li>
21  *
22  * @since 2.0.0
23  */

24 public interface CacheJmxWrapperMBean extends LifeCycle
25 {
26    /**
27     * Retrieves a reference to the underlying {@link Cache}
28     */

29    Cache getCache();
30
31    /**
32     * @return an immutable configuration
33     */

34    Configuration getConfiguration();
35
36    /**
37     * @return a string based representation of the configuration
38     */

39    String JavaDoc getConfigurationAsString();
40
41    /**
42     * @return an HTML formatted string based representation of the configuration
43     */

44    String JavaDoc getConfigurationAsHtmlString();
45
46    /**
47     * @return details of nodes in the cache
48     */

49    String JavaDoc getCacheDetails();
50
51    /**
52     * @return details of nodes in the cache, formatted as HTML
53     */

54    String JavaDoc getCacheDetailsAsHtml();
55
56    /**
57     * @return number of nodes in the cache
58     */

59    int getNumberOfNodes();
60
61    /**
62     * @return number of attributes in the cache
63     */

64    int getNumberOfAttributes();
65
66    /**
67     * @return information on the state of node locks
68     */

69    String JavaDoc getLockInfo();
70
71    /**
72     * @return information on the state of node locks, formatted as HTML
73     */

74    String JavaDoc getLockInfoAsHtml();
75
76    /**
77     * Gets whether this object should register the cache's interceptors
78     * with JMX during {@link LifeCycle#create() create()}.
79     * <p/>
80     * Default is <code>true</code>.
81     */

82    boolean getRegisterInterceptors();
83
84    /**
85     * Sets whether this object should register the cache's interceptors
86     * with JMX during {@link LifeCycle#create() create()}.
87     * <p/>
88     * Default is <code>true</code>.
89     */

90    void setRegisterInterceptors(boolean register);
91 }
92
Popular Tags