[jboss-cvs] JBossCache/src/org/jboss/cache/jmx ...

Manik Surtani manik at jboss.org
Wed May 23 06:28:48 EDT 2007


  User: msurtani
  Date: 07/05/23 06:28:48

  Modified:    src/org/jboss/cache/jmx       CacheLegacyJmxWrapper.java
                        JmxUtil.java LegacyConfiguration.java
                        CacheJmxWrapperMBean.java
                        CacheNotificationListener.java CacheJmxWrapper.java
  Log:
  Initiated a bunch of performance fixes, including replacing CopyOnWriteArraySets with org.jboss.cache.util.concurrent.ConcurrentHashSet.
  Also ran an imports optimiser on the code base - there were a lot of unused imports floating about.
  
  Revision  Changes    Path
  1.10      +17 -17    JBossCache/src/org/jboss/cache/jmx/CacheLegacyJmxWrapper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheLegacyJmxWrapper.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheLegacyJmxWrapper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- CacheLegacyJmxWrapper.java	23 May 2007 05:44:53 -0000	1.9
  +++ CacheLegacyJmxWrapper.java	23 May 2007 10:28:48 -0000	1.10
  @@ -21,11 +21,6 @@
    */
   package org.jboss.cache.jmx;
   
  -import javax.management.MBeanServer;
  -import javax.management.NotificationBroadcaster;
  -import javax.management.ObjectName;
  -import javax.transaction.TransactionManager;
  -
   import org.jboss.cache.CacheException;
   import org.jboss.cache.config.BuddyReplicationConfig;
   import org.jboss.cache.config.CacheLoaderConfig;
  @@ -38,13 +33,18 @@
   import org.jgroups.ChannelFactory;
   import org.w3c.dom.Element;
   
  +import javax.management.MBeanServer;
  +import javax.management.NotificationBroadcaster;
  +import javax.management.ObjectName;
  +import javax.transaction.TransactionManager;
  +
   /**
    * {@link CacheJmxWrapper} subclass that supports building the
    * {@link Configuration} from MBean attribute injection.  Allows
    * configuration of the cache using the JBoss AS 4.x JMX microkernel.
    *
    * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
    */
   public class CacheLegacyJmxWrapper extends CacheJmxWrapper implements CacheLegacyJmxWrapperMBean, NotificationBroadcaster
   {
  @@ -95,7 +95,7 @@
               Channel ch;
               try
               {
  -               ch = (Channel) mbs.invoke(multiplexerService, "createMultiplexerChannel", new Object[] { cfg.getMultiplexerStack(), cfg.getClusterName() }, new String[] { String.class.getName(), String.class.getName() });
  +               ch = (Channel) mbs.invoke(multiplexerService, "createMultiplexerChannel", new Object[]{cfg.getMultiplexerStack(), cfg.getClusterName()}, new String[]{String.class.getName(), String.class.getName()});
               }
               catch (Exception e)
               {
  
  
  
  1.16      +8 -9      JBossCache/src/org/jboss/cache/jmx/JmxUtil.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JmxUtil.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/JmxUtil.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- JmxUtil.java	22 May 2007 22:45:20 -0000	1.15
  +++ JmxUtil.java	23 May 2007 10:28:48 -0000	1.16
  @@ -21,7 +21,6 @@
    */
   package org.jboss.cache.jmx;
   
  -import org.jboss.cache.CacheException;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.interceptors.Interceptor;
   
  @@ -35,7 +34,7 @@
    *
    * @author Jerry Gauthier
    * @author Manik Surtani
  - * @version $Id: JmxUtil.java,v 1.15 2007/05/22 22:45:20 bstansberry Exp $
  + * @version $Id: JmxUtil.java,v 1.16 2007/05/23 10:28:48 msurtani Exp $
    */
   public class JmxUtil
   {
  
  
  
  1.3       +15 -17    JBossCache/src/org/jboss/cache/jmx/LegacyConfiguration.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LegacyConfiguration.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/LegacyConfiguration.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- LegacyConfiguration.java	23 May 2007 05:21:45 -0000	1.2
  +++ LegacyConfiguration.java	23 May 2007 10:28:48 -0000	1.3
  @@ -21,18 +21,18 @@
    */
   package org.jboss.cache.jmx;
   
  -import javax.management.ObjectName;
  -import javax.transaction.TransactionManager;
  -
   import org.jboss.cache.Region;
   import org.jgroups.ChannelFactory;
   import org.w3c.dom.Element;
   
  +import javax.management.ObjectName;
  +import javax.transaction.TransactionManager;
  +
   /**
    * Legacy configuration attributes from JBC 1.x.
    * 
    * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public interface LegacyConfiguration
   {
  @@ -317,13 +317,11 @@
      void setMuxChannelFactory(ChannelFactory factory);
      
      /**
  -    * 
       * @deprecated directly inject the ChannelFactory via {@link #setMuxChannelFactory(ChannelFactory)}
       */
      ObjectName getMultiplexerService();
      
      /**
  -    * 
       * @deprecated directly inject the ChannelFactory via {@link #setMuxChannelFactory(ChannelFactory)}
       */
      void setMultiplexerService(ObjectName muxService);
  
  
  
  1.7       +3 -3      JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapperMBean.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheJmxWrapperMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapperMBean.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- CacheJmxWrapperMBean.java	22 May 2007 22:52:52 -0000	1.6
  +++ CacheJmxWrapperMBean.java	23 May 2007 10:28:48 -0000	1.7
  @@ -6,13 +6,13 @@
    */
   package org.jboss.cache.jmx;
   
  -import java.util.List;
  -
   import org.jboss.cache.Cache;
   import org.jboss.cache.CacheException;
   import org.jboss.cache.config.Configuration;
   import org.jgroups.Address;
   
  +import java.util.List;
  +
   /**
    * JMX interface to the {@link org.jboss.cache.Cache}.  Full access to the cache is not supported, only a certain
    * set of operations are exposed via JMX:
  
  
  
  1.3       +29 -30    JBossCache/src/org/jboss/cache/jmx/CacheNotificationListener.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheNotificationListener.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheNotificationListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- CacheNotificationListener.java	10 May 2007 17:30:52 -0000	1.2
  +++ CacheNotificationListener.java	23 May 2007 10:28:48 -0000	1.3
  @@ -22,23 +22,22 @@
   
   package org.jboss.cache.jmx;
   
  -import java.util.Map;
  -import java.util.concurrent.atomic.AtomicLong;
  -
  -import javax.management.MBeanNotificationInfo;
  -import javax.management.Notification;
  -
   import org.jboss.cache.CacheListener;
   import org.jboss.cache.CacheSPI;
   import org.jboss.cache.Fqn;
   import org.jgroups.View;
   
  +import javax.management.MBeanNotificationInfo;
  +import javax.management.Notification;
  +import java.util.Map;
  +import java.util.concurrent.atomic.AtomicLong;
  +
   /**
    * A {@link CacheListener} that creates JMX notifications from listener
    * events.
    * 
    * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   class CacheNotificationListener implements CacheListener
   {
  
  
  
  1.22      +50 -51    JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheJmxWrapper.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapper.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- CacheJmxWrapper.java	23 May 2007 01:36:12 -0000	1.21
  +++ CacheJmxWrapper.java	23 May 2007 10:28:48 -0000	1.22
  @@ -21,40 +21,39 @@
    */
   package org.jboss.cache.jmx;
   
  -import java.util.List;
  -import java.util.concurrent.atomic.AtomicInteger;
  -
  -import javax.management.JMException;
  -import javax.management.ListenerNotFoundException;
  -import javax.management.MBeanNotificationInfo;
  -import javax.management.MBeanRegistration;
  -import javax.management.MBeanServer;
  -import javax.management.MalformedObjectNameException;
  -import javax.management.NotificationBroadcasterSupport;
  -import javax.management.NotificationFilter;
  -import javax.management.NotificationListener;
  -import javax.management.ObjectName;
  -
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.Cache;
   import org.jboss.cache.CacheException;
   import org.jboss.cache.CacheImpl;
   import org.jboss.cache.DefaultCacheFactory;
  -import org.jboss.cache.LifecycleUtil;
   import org.jboss.cache.LifecycleState;
  +import org.jboss.cache.LifecycleUtil;
   import org.jboss.cache.config.Configuration;
   import org.jboss.cache.config.ConfigurationException;
   import org.jboss.cache.interceptors.Interceptor;
   import org.jgroups.Address;
   
  +import javax.management.JMException;
  +import javax.management.ListenerNotFoundException;
  +import javax.management.MBeanNotificationInfo;
  +import javax.management.MBeanRegistration;
  +import javax.management.MBeanServer;
  +import javax.management.MalformedObjectNameException;
  +import javax.management.NotificationBroadcasterSupport;
  +import javax.management.NotificationFilter;
  +import javax.management.NotificationListener;
  +import javax.management.ObjectName;
  +import java.util.List;
  +import java.util.concurrent.atomic.AtomicInteger;
  +
   /**
    * Wrapper class that exposes a
    * {@link CacheJmxWrapperMBean JMX management interface} for an instance of 
    * {@link CacheImpl}.
    * 
    * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
  - * @version $Revision: 1.21 $
  + * @version $Revision: 1.22 $
    */
   public class CacheJmxWrapper 
      extends NotificationBroadcasterSupport
  
  
  



More information about the jboss-cvs-commits mailing list