[jboss-cvs] JBossCache/src/org/jboss/cache/jmx ...
Manik Surtani
msurtani at jboss.com
Wed Sep 6 10:45:41 EDT 2006
User: msurtani
Date: 06/09/06 10:45:41
Modified: src/org/jboss/cache/jmx Cache.java CacheMBean.java
Log:
fixed JMX tests, added more JMX tests
Revision Changes Path
1.2 +10 -171 JBossCache/src/org/jboss/cache/jmx/Cache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Cache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/Cache.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Cache.java 6 Sep 2006 11:35:07 -0000 1.1
+++ Cache.java 6 Sep 2006 14:45:41 -0000 1.2
@@ -1,18 +1,8 @@
package org.jboss.cache.jmx;
-import org.jboss.cache.CacheListener;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Node;
-import org.jboss.cache.Region;
import org.jboss.cache.TreeCacheProxyImpl;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.interceptors.InterceptorMBean;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
/**
* JMX object that operates on the cache
@@ -28,90 +18,9 @@
tcpi = (TreeCacheProxyImpl) cacheSPI;
}
-
- public List<InterceptorMBean> getInterceptorMBeans()
- {
- return tcpi.treeCache.getInterceptors();
- }
-
- public Configuration getConfiguration()
- {
- return tcpi.getConfiguration();
- }
-
- public Node getRoot()
- {
- return tcpi.getRoot();
- }
-
- public void addCacheListener(CacheListener l)
- {
- tcpi.addCacheListener(l);
- }
-
- public void addCacheListener(Fqn region, CacheListener l)
- {
- tcpi.addCacheListener(region, l);
- }
-
- public void removeCacheListener(CacheListener l)
- {
- tcpi.removeCacheListener(l);
- }
-
- public void removeCacheListener(Fqn region, CacheListener l)
- {
- tcpi.removeCacheListener(region, l);
- }
-
- public Set<CacheListener> getCacheListeners()
- {
- return tcpi.getCacheListeners();
- }
-
- public Set<CacheListener> getCacheListeners(Fqn region)
- {
- return tcpi.getCacheListeners(region);
- }
-
- public void put(Fqn fqn, Object key, Object value)
- {
- tcpi.put(fqn, key, value);
- }
-
- public void put(Fqn fqn, Map data)
- {
- tcpi.put(fqn, data);
- }
-
- public void remove(Fqn fqn, Object key)
- {
- tcpi.remove(fqn, key);
- }
-
- public void removeNode(Fqn fqn)
- {
- tcpi.removeNode(fqn);
- }
-
- public Object get(Fqn fqn, Object key)
- {
- return tcpi.get(fqn, key);
- }
-
- public void evict(Fqn fqn, boolean recursive)
- {
- tcpi.evict(fqn, recursive);
- }
-
- public Region getRegion(Fqn fqn)
- {
- return tcpi.getRegion(fqn);
- }
-
- public void create() throws Exception
+ public org.jboss.cache.Cache getCache()
{
- tcpi.create();
+ return tcpi;
}
public void start() throws Exception
@@ -124,93 +33,23 @@
tcpi.stop();
}
- public void destroy()
- {
- tcpi.destroy();
- }
-
- public Node getParent()
- {
- return tcpi.getParent();
- }
-
- public Collection<Node> getChildren()
- {
- return tcpi.getChildren();
- }
-
- public Map getData()
- {
- return tcpi.getData();
- }
-
- public Set getKeys()
- {
- return tcpi.getKeys();
- }
-
- public Fqn getFqn()
- {
- return tcpi.getFqn();
- }
-
- public Node addChild(Fqn f)
- {
- return tcpi.addChild(f);
- }
-
- public void removeChild(Fqn f)
- {
- tcpi.removeChild(f);
- }
-
- public Node getChild(Fqn f)
- {
- return tcpi.getChild(f);
- }
-
- public void put(Object k, Object v)
- {
- tcpi.put(k, v);
- }
-
- public void putIfNull(Object k, Object v)
- {
- tcpi.putIfNull(k, v);
- }
-
- public void put(Map m)
- {
- tcpi.put(m);
- }
-
- public void putIfNull(Map m)
- {
- tcpi.putIfNull(m);
- }
-
- public Object get(Object k)
- {
- return tcpi.get(k);
- }
-
- public Object remove(Object k)
+ public void create() throws Exception
{
- return tcpi.remove(k);
+ tcpi.create();
}
- public void clearData()
+ public void destroy()
{
- tcpi.clearData();
+ tcpi.destroy();
}
- public void move(Node newParent)
+ public Configuration getConfiguration()
{
- tcpi.move(newParent);
+ return tcpi.getConfiguration();
}
- public boolean hasChild(Fqn f)
+ public String printCacheDetails()
{
- return tcpi.hasChild(f);
+ return tcpi.treeCache.printDetails();
}
}
1.4 +19 -6 JBossCache/src/org/jboss/cache/jmx/CacheMBean.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheMBean.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheMBean.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- CacheMBean.java 5 Sep 2006 18:09:56 -0000 1.3
+++ CacheMBean.java 6 Sep 2006 14:45:41 -0000 1.4
@@ -7,19 +7,32 @@
package org.jboss.cache.jmx;
import org.jboss.cache.Cache;
-import org.jboss.cache.interceptors.InterceptorMBean;
-
-import java.util.List;
+import org.jboss.cache.config.Configuration;
/**
* JMX interface to the {@link org.jboss.cache.Cache}
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
*/
-public interface CacheMBean extends Cache
+public interface CacheMBean
{
/**
- * @return an immutable {@link java.util.List} of {@link org.jboss.cache.interceptors.Interceptor}s configured for this cache.
+ * Retrieves a reference to the underlying {@link Cache}
*/
- List<InterceptorMBean> getInterceptorMBeanChain();
+ Cache getCache();
+
+ void start() throws Exception;
+
+ void stop();
+
+ void create() throws Exception;
+
+ void destroy();
+
+ /**
+ * Retrieves an immutable configuration
+ */
+ Configuration getConfiguration();
+
+ String printCacheDetails();
}
More information about the jboss-cvs-commits
mailing list